Jsp_include directive and <jsp:include>

Source: Internet
Author: User

Consists of three files: jsp_include.jsp, static.html, two.jsp

Surrounding environment: 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" >

In Tomcat with version number 7.0 or above. There is an error in using the quotes continuously. The workaround is as follows:

Tomcat-fix which must be escaped when used within the value error

2.static.html

<! DOCTYPE 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"); %>

Code I uploaded to my resources. http://download.csdn.net/detail/svitter/7342523

Copyright notice: This article blog original article. Blogs, without consent, may not be reproduced.

Jsp_include directive and &lt;jsp:include&gt;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.