How can you declare that the web container must send this JSP page whenever a 403 status is generated?

You have built a web application with tight security. Several directories of your webapp are used
for internal purposes and you have overridden the default servlet to send an HTTP 403 status
code for any request that maps to one of these directories. During testing, the Quality Assurance
director decided that they did NOT like seeing the bare response page generated by Firefox and
Internet Explorer. The director recommended that the webapp should return a more user-friendly
web page that has the same look-and-feel as the webapp plus links to the webapp’s search
engine. You have created this JSP page in the /WEB-INF/jsps/error403.jsp file. You do NOT want
to alter the complex logic of the default servlet.How can you declare that the web container must
send this JSP page whenever a 403 status is generated?

You have built a web application with tight security. Several directories of your webapp are used
for internal purposes and you have overridden the default servlet to send an HTTP 403 status
code for any request that maps to one of these directories. During testing, the Quality Assurance
director decided that they did NOT like seeing the bare response page generated by Firefox and
Internet Explorer. The director recommended that the webapp should return a more user-friendly
web page that has the same look-and-feel as the webapp plus links to the webapp’s search
engine. You have created this JSP page in the /WEB-INF/jsps/error403.jsp file. You do NOT want
to alter the complex logic of the default servlet.How can you declare that the web container must
send this JSP page whenever a 403 status is generated?

A.
<error-page>
<error-code>403</error-code>
<url>/WEB-INF/jsps/error403.jsp</url>
</error-page>

B.
<error-page>
<status-code>403</status-code>
<url>/WEB-INF/jsps/error403.jsp</url>
</error-page>

C.
<error-page>
<error-code>403</error-code>
<location> /WEB-INF/jsps/error403.jsp</location>
</error-page>

D.
<error-page>
<status-code>403</status-code>
<location>/WEB-INF/jsps/error403.jsp</location>
</error-page>

Explanation:



Leave a Reply 0

Your email address will not be published. Required fields are marked *