日期:2014-05-18  浏览次数:20568 次

tomcat的值传不到页面上,
做了一个小的程序测试我的TOMCAT安装是否正常,
<html>
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 ">
<title> jsp测试 </title>
</head>

<body>
<form   name= "submitForm "   action= "result.jsp "   method= "get ">
<input   type= "text "   name= "name ">
<br>
<input   type= "submit "   value= "确定 ">
</form>

<%   String   s   =   request.getParameter( "name ");%>
<%
if(s.equals( " ")){
out.println( "name空 ");

}else{
out.println(s);
}
//%>
</body>
</html>
</BLOCKQUOTE>
输入完以后,值传不到页面,这段程序在别人的系统上就能传到页面上,程序没有错,这是哪的问题:
请大家帮忙


------解决方案--------------------
加个判断:
if(null==s||s.equals( " "))
{
out.println( "name空 ");
}
else
{
out.println(s);
}
------解决方案--------------------
</BLOCKQUOTE>

这个?