包含三个文件:jsp_include.jsp, static.html, two.jsp
环境:tomcat7.0, myeclipse10
1.jsp_include.jsp
?
1
2
3
4
5
6
7
8
9
10
11
<%@ page contentType="text/html;charest=UTF-8" language="java" %>
<%@ include file="static.html"%>
goto two-->
this examples show include works
在版本7.0以上的tomcat中,连续使用引号会出现错误,解决方法如下:
Tomcat - 解决which must be escaped when used within the value错误
2.static.html?
1
2
3
4
5
6
7
8
9
10
please input your name:
please input your password:
3.two.jsp
?
1
2
3
4
5
6
7
8
9
<%@ page contentType="text/html;charest=UTF-8" language="java" %>
this is a1=<%=request.getParameter("a1") %>
this is a2=<%=request.getParameter("a2") %>
<% out.println("hello from two.jsp"); %>
代码我上传到了我的资源,