Suppose that you are creating a Java web application named “ cset-test” consisti
ID: 3916458 • Letter: S
Question
Suppose that you are creating a Java web application named “cset-test” consisting of a JSP file named “main.jsp”, and a Java Servlet in a file named “InfoServlet.java”.
a. (10 pts) what is the relative path to the main.jsp file for the cset-test web application?
b. (10 pts) Write the all the XML required to map BOTH of the following URLs to map to the “InfoServlet”:
http://131.183.222.38:8080/cset-test/info
http://131.183.222.38:8080/cset-test/about
Explanation / Answer
Answer A:
cset-test/main.jsp
Answer B:
<servlet-mapping>
<servlet-name>InfoServlet</servlet-name>
<url-pattern>/info</url-pattern>
<url-pattern>/about</url-pattern>
</servlet-mapping>
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.