Java Learning -037-javaweb_006--JSP action ID-Include

Source: Internet
Author: User

This action refers to the current page contains one or more JSP pages or HTML files, syntax: <jsp:include file= ". /jsp/login.jsp "flush=" true "/>

Where file is the relative path where the files are loaded, and the Flush property is set to True, the load page is automatically refreshed. If you need to pass parameters when loading a file or Web page, the syntax format is as follows:

<jsp:include file= ". /jsp/login.jsp "flush=" true "/>    <jsp:param name=" username "value=" admin "/>    <jsp:param naem=" Userpass "value=" 123456 "/></jsp:include>

The source code for the usinglogin.jsp file is:

<%@ page pageencoding= "utf-8"%><%@ page contenttype= "text/html; Charset=utf-8 "%><%@ include file="./login.html "%>

The source code for the login.html file is:

Put two files in the same directory, start Tomcat, enter in the browser: http://localhost:8080/jsp/006/UsingLogin.jsp, the browser page appears as follows:

At this point, Java Learning -037-javaweb_006-JSP Action logo-include a smooth end, I hope this article can give beginners javaweb you a reference.

Finally, very grateful to the pro-stop, I hope this article can be pro helpful. Warmly welcome the kiss to discuss together and progress together. Thank you so much! ^_^

Java Learning -037-javaweb_006--JSP action ID-Include

Related Article

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.