In the development of SSH project, the reason of putting JSP page in Web-inf is analyzed

Source: Internet
Author: User



In some highly secure project development, we often see JSP pages are placed under the Web-inf. This is due to security considerations,

is a for the security of the code. This is a bit cumbersome to implement, and page jumps are inconvenient. But the security of the whole project is up! The

in still It is recommended to use this practice in a number of high-security-demanding projects!


This is an example I wrote, I just put all the JSP pages under Web-inf, and then according to the module allocation, course folder is put and

JSP pages related to course information management. If we enter the HTTPS://LOCALHOST:8080/project name/page/admin/index.jsp is not to be visited

Ask, put the entire page folder under Webroot of course you can.


Then share the implementation of the code to implement the Web-inf page jump

If we click on the image below the Start button, jump to the main interface


Configure in the Struts.xml file

<action name= "Indexaction" >            <result>/WEB-INF/page/admin/index.jsp</result>       </ Action>  

and add it in the link.

<a href= "indexaction.action" class= "Icon-home" > Start </a>








In the development of SSH project, the reason of putting JSP page in Web-inf is analyzed

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.