为什么在tomcat下可以正常运行,而在jbuilder下出现错误??
在jbuilder9.0下运行jsp_include.jsp程序时,出现"jsp_include.jsp": Attribute name has no value at line 9, column 58错误提示?
有人对我说:"因为jsp:include是在运行时嵌入,所以使用request无法获得值!"
但是我在jdk+tomcat下,在浏览器中输入http://127.0.0.1/jsp_include.jsp又可以正常运行.
请大家帮我把问题再解析一下.<jbuilder9.0能够正常运行别的jsp程序.>
jsp_include.jsp文件 :
<%@ page contentType="text/html; charset=gb2312" language="java" %>
<html>
<body>
<%@ include file="static_html.html" %>
<%//只是把文件包含进来%>
<a href="two.jsp">goto two--></a><br>
this examples show include works
<jsp:include page="tow.jsp" flush="true">
<jsp:param name="a1" value="<%=request.getParameter("name")%>"/>
<jsp:param name="a2" value="<%=request.getParameter("password")%>"/>
</jsp:include>
</body>
</html>
//static_html.html文件:
<html>
<body>
<form method=post action="jsp_include.jsp">
<table>
<tr>
<td>please input your name:</td></tr>
<tr><td>
<input type=text name=name>
</td></tr>
<tr><td>input you password:</td>
<td>
<input type=text name=password>
</td>
</tr>
<tr>
<td>
<input type=submit value=login>
</td>
</tr>
</table>
</form>
</body>
</html>
//two.jsp文件:
<%@ page contentType="text/html; charset=GBK" language="java"%>
<html>
<head>
<title>
tow
</title>
</head>
<body bgcolor="#ffffff">
<br>
this is a1=<%=request.getParameter("a1")%>;
<br>
this is a2=<%=request.getParameter("a2")%>;
<br>
<%out.println("hello form two.jsp");%>
</body>
</html>