Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Struts%20Interview%20Questions%20and%20Answers

Question: Resources under WEB-INF
Answer:
According to the Servlet specification, resources (e.g. JSP files) stored under WEB-INF are protected and cannot be accessed directly by the browsers. One design idiom for Struts 1.0 is to put all the JSP files under WEB-INF and front them by Actions so that clients cannot illegally access the JSPs. With the introduction of sub-application prefixes in Struts 1.1, mapping resources under WEB-INF gets complicated. Extra configuration steps utilizing the pagePattern and forwardPattern attributes of the element in struts-config.xml is required to inform Struts to construct the paths correctly. More specifically, you need to set these attributes to the pattern "/WEB-INF/$A$P".
Is it helpful? Yes No

Most helpful rated by users:

©2024 WithoutBook