JSP_include指令和<jsp:include>
2014-05-13 21:45
369 查看
包含三个文件:jsp_include.jsp, static.html, two.jsp
环境:tomcat7.0, myeclipse10
1.jsp_include.jsp
在版本7.0以上的tomcat中,连续使用引号会出现错误,解决方法如下:
Tomcat - 解决which must be escaped when used within
the value错误
2.static.html
3.two.jsp
代码我上传到了我的资源。。http://download.csdn.net/detail/svitter/7342523
环境:tomcat7.0, myeclipse10
1.jsp_include.jsp
<%@ page contentType="text/html;charest=UTF-8" language="java" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <body><%@ include file="static.html"%> <a href = "two.jsp">goto two--></a><br> this examples show include works <jsp:include page="two.jsp" flush="true"> <jsp:param name="a1" value='<%=request.getParameter("name")%>'/> <jsp:param name="a2" value='<%=request.getParameter("password")%>'/> </jsp:include> </body> </html>
在版本7.0以上的tomcat中,连续使用引号会出现错误,解决方法如下:
Tomcat - 解决which must be escaped when used within
the value错误
2.static.html
<!DOCTYPE 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>please input your password: </td></tr> <tr><td><input type=text name=password></td></tr> <tr><td><input type=submit value=login></td></tr> </table> </form> </body> </html>
3.two.jsp
<%@ page contentType="text/html;charest=UTF-8" language="java" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <br> this is a1=<%=request.getParameter("a1") %> <br> this is a2=<%=request.getParameter("a2") %> <br> <% out.println("hello from two.jsp"); %>
代码我上传到了我的资源。。http://download.csdn.net/detail/svitter/7342523
相关文章推荐
- <jsp:include>标签与include指令的比较
- ₪<jsp:include>与include指令的比较
- <jsp:include>与include指令的比较
- <jsp:include>与include指令的区别
- jsp用静态指令<%=include file=""%>编码问题
- JSP_include指令和<jsp:include>
- Include指令和<jsp:include>两种动作表示的区别
- include指令与<jsp:include>动作的区别
- JSP 中使用<%@include%> 报 Duplicate local variable path 错误的解决方法
- Java Web开发2___<jsp:include>和<%@ include %>的区别
- <jsp:include page=""/>和<%@include file=""%>-----JSP中两种页面引入方式的区别
- <jsp:include page="xxx"> 和<%@include file="xxx">区别
- <%@ include file=""%>与<jsp:include page=""/>区别
- Hello JSP!——<jsp:include>动作元素篇
- <jsp:include page="">与<&@ include file="">的区别
- 他のJSPページを読み込む<bean:include>
- <%@ include > 和 <jsp:include>的区别
- JSP引入文件的两种方式:<jsp:include page=”file.jsp” />和<%@ include file=”file.jsp”%>
- JSP 之 动态包含 <jsp:include />
- <jsp:include page="">和<%@include page=""%> 标签学习