當前位置:
首頁 >
前端技术
> javascript
>内容正文
javascript
JSP_include指令和lt;jsp:includegt;
生活随笔
收集整理的這篇文章主要介紹了
JSP_include指令和lt;jsp:includegt;
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
包括三個文件:jsp_include.jsp, static.html, two.jsp
周邊環境: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錯誤
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
版權聲明:本文博客原創文章。博客,未經同意,不得轉載。
轉載于:https://www.cnblogs.com/yxwkf/p/4688903.html
總結
以上是生活随笔為你收集整理的JSP_include指令和lt;jsp:includegt;的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: sql server2008中左连接,右
- 下一篇: [转]删除MSSQL所有的约束及表格