<HTML><HEAD><TITLE>锋网ijsp.net-Mysql字段长度</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="../../../inc/book.css" type=text/css rel=stylesheet>
<META content="MSHTML 5.50.4134.600" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff leftMargin=0 topMargin=0 MARGINHEIGHT="0"
MARGINWIDTH="0">
<style type="text/css">
.f14 {font-size:14px}
</style>
<script language="JavaScript">
function doZoom(size){
document.getElementById('zoom').style.fontSize=size+'px'
setTailPosition()
}
function doPrint(){
var str="<html>\n<meta http-equiv='content-type' content='text/html; charset=gb2312'>";
var article;
var css;
var strAdBegin="<!--SPORTSZW_HZH_BEGIN-->";
var strAdEnd="<!--SPORTSZW_HZH_END-->";
var strFontSize='【<A href="javascript:doZoom(16)">大</A> <A href="javascript:doZoom(14)">中</A> <A href="javascript:doZoom(12)">小</A>】'
var strdoPrint="doPrint()";
var strTmp;
css="<style>"
+"body{font-family:宋体}"
+"td,.f12{font-size:12px}"+".f24 {font-size:24px;}"
+".f14 {font-size:14px;}"
+".title14 {font-size:14px;line-height:130%}"
+".l17 {line-height:170%;}"
+".x14 {font-size:14px;line-height:130%}"
+".font14b {font-family: '宋体'; font-size: 14px; color: #000000;}"
+"</style>";
str += css;
str += '<meta http-equiv="content-type" content="text/html; charset=gb2312">';
str += '<title>'+document.title+'</title>';
str += "<body bgcolor=#ffffff topmargin=5 leftmargin=5 marginheight=5 marginwidth=5 onLoad='window.print()'>";
str += "<center><table width=600 border=0 cellspacing=0 cellpadding=0><tr><td valign=bottom><font color=#0000ff><a href=\"../../../index.htm\">首页</A> > <a href=\"../../../list?id=2\">教程</a> > <a href=\"../../../slist?id=6\">数据库</a> > 正文</font></td><td align=right valign=bottom><a href='javascript:history.back()'>返回</a> <a href='javascript:window.print()'>打印</a></td></tr></table>"
str += "<table width=600 border=0 cellpadding=0 cellspacing=20 bgcolor=#ffffff><tr><td>";
article=document.getElementById('article').innerHTML;
if(article.indexOf(strAdBegin)!=-1){
str +=article.substr(0,article.indexOf(strAdBegin));
strTmp=article.substr(article.indexOf(strAdEnd)+strAdEnd.length, article.length);
}else{
strTmp=article
}
str +=strTmp
str += window.location.href
str += "</td></tr></table></center>";
str += "</body></html>";
document.write(str);
document.close();
}
</script>
<script src="../../../inc/header1.js"></script>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
<TBODY>
<TR>
<TD vAlign=top width=170 bgColor=#a6c0f5>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD><IMG height=5
src="../../../images/s.gif"
width=170></TD></TR></TBODY></TABLE>
<script src="../../../inc/search1.js"></script> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD><IMG height=5
src="../../../images/s.gif"
width=1></TD></TR></TBODY></TABLE></TD>
<TD width=1 bgColor=#6386de><IMG height=1
src="../../../images/s.gif"
width=1></TD>
<TD vAlign=top>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD><IMG height=1
src="../../../images/s.gif"
width=549></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=5 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD>当前位置:> <a href="../../../index.htm">首页</A> > <a href="../../../list?id=2">教程</a> > <a href="../../../slist?id=6">数据库</a> > 正文
</TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD background="../../../images/wlinebg.gif"
bgColor=#808080><IMG height=1
src="../../../images/s.gif"
width=1></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
<TBODY>
<TR>
<TD><IMG height=5
src="../../../images/s.gif"
width=1></TD></TR></TBODY></TABLE>
<div id=article>
<TABLE cellSpacing=0 cellPadding=5 width="100%" bgColor=#eeeeee
border=0><TBODY>
<TR>
<TD align=middle><font class=font14b>Mysql字段长度</a></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=5 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top width=100%><font id="zoom" class=f14>如何混合使用Jsp和SSI #include? <br>在JSP中可以使用如下方式包含纯HTML: <br><!--#include file="data.inc"--> <br>但是如果data.inc中包含JSP CODE ,我们可以使用: <br><%@include file="data.inc"%> <br><br><br>如何执行一个线程安全的JSP? <br>只需增加如下指令 <br><%@ page isThreadSafe="false" %> <br><br><br>JSP如何处理HTML FORM中的数据? <br>通过内置的request对象即可,如下: <br><% <br>String item = request.getParameter("item"); <br>int howMany = new Integer(request.getParameter("units")).intValue(); <br>%> <br><br><br>在JSP如何包含一个静态文件? <br>静态包含如下:<%@ include file="copyright.html" %> <br>动态包含如下:<jsp:include page="copyright.html" flush="true"/> <br><br><br>在JSP中如何使用注释? <br>主要有四中方法: <br>1。<%-- 与 --%> <br>2。// <br>3。/**与**/ <br>4。<!--与--> <br><br><br>在JSP中如何执行浏览重定向? <br>使用如下方式即可:response.sendRedirect("http://ybwen.home.chinaren.com/index.html"); <br>也能物理地改变HTTP HEADER属性,如下: <br><% <br>response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); <br>String newLocn="/newpath/index.html"; <br>response.setHeader("Location",newLocn); <br>%> <br><br><br>如何防止在JSP或SERVLET中的输出不被BROWSER保存在CACHE中? <br>把如下脚本加入到JSP文件的开始即可: <br><% <br>response.setHeader("Cache-Control","no-store"); //HTTP 1.1 <br>response.setHeader("Pragma","no-cache"); //HTTP 1.0 <br>response.setDateHeader ("Expires", 0); //prevents caching at the proxy server <br>%> <br><br><br>在JSP中如何设置COOKIE? <br>COOKIE是作为HTTP HEADER的一部分被发送的,如下方法即可设置: <br><% <br>Cookie mycookie = new Cookie("aName","aValue"); <br>response.addCookie(mycookie); <br>%> <br><br><br>在JSP中如何删除一个COOKIE? <br><% <br>Cookie killMyCookie = new Cookie("mycookie", null); <br>killMyCookie.setMaxAge(0); <br>killMyCookie.setPath("/"); <br>response.addCookie(killMyCookie); <br>%> <br><br><br>在一个JSP的请求处理中如何停止JSP的执行 <br>如下例: <br><% <br>if (request.getParameter("wen") != null) { <br>// do something <br>} else { <br>return; <br>} <br>%> <br><br><br>在JSP中如何定义方法 <br>你可以定义方法,但是你不能直接访问JSP的内置对象,而是通过参数的方法传递。如下: <br><%! <br>public String howBadFrom(HttpServletRequest req) { <br>HttpSession ses = req.getSession(); <br>... <br>return req.getRemoteHost(); <br>} <br>%> <br><% <br>out.print("in general,lao lee is not baddie "); <br>%> <br><%= howBadFrom(request) %> <br><br><br>如果BROWSER已关闭了COOKIES,在JSP中我如何打开SESSION来跟踪 <br>使用URL重写即可,如下: <br>hello1.jsp <br><%@ page session="true" %> <br><% <br>Integer num = new Integer(100); <br>session.putValue("num",num); <br>String url =response.encodeURL("hello2.jsp"); <br>%> <br><a href='<%=url%>'>hello2.jsp</a> <br><br>hello2.jsp <br><%@ page session="true" %> <br><% <br>Integer i= (Integer )session.getValue("num"); <br>out.println("Num value in session is "+i.intValue()); <br>%> <br><br><br>在JSP中能发送EMAIL吗 <br>可以使用SUN的专用包:sun.net.smtp包。如下脚本使用SmtpClient类发送EMAIL。 <br><%@ page import="sun.net.smtp.SmtpClient, java.io.*" %> <br><% <br>String from="ybwen@sina.com"; <br>String to="hewenjun@yeah.net, lei@who.com.cn"; <br>try{