JSP files in the Web-inf directory are not directly accessible in the browser. (no permission to access)
If you put the JSP file into the Web-inf directory, you will not be able to access it.
For example, write directly in the JSP page
1 <a href= "/web-inf/content/index.jsp" >
Then it will not be accessible.
In struts, you must use action to jump the page in order to access the JSP file inside the Web-inf.
Write the link in the JSP page above as:
<a href=index.action>
Add this sentence to the Struts configuration file:
1 <action name= "*" > 2 <result>/WEB-INF/content/{1}.jsp</result> 3 </action>
This means that all action on the page jumps to the JSP page for the action under/web-inf/conent/. Of course, if the other specific action is top-justified, it jumps to the corresponding JSP page.
By adding the above action, the hyperlink to the page is positioned below the Web-inf/content directory.
Access the JSP file inside the Web-inf