JSPinclude指令和(jsp:include) -电脑资料

电脑资料 时间:2019-01-01 我要投稿
【www.unjs.com - 电脑资料】

   

    包含三个文件: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"); %>

    代码我上传到了我的资源,

JSPinclude指令和(jsp:include)

电脑资料

JSPinclude指令和(jsp:include)》(https://www.unjs.com)。。在审核,有时间我会帖上链接方便大家下载阅读。

最新文章