It says answer 3 is correct. Shouldn't the context name be there? Please explain. Thanks Deep
Question 28) 1)Given the following web application deployment descriptor: <web-app> <servlet> <servlet-name>myServlet</servlet-name> <servlet-class>MyServlet</servlet-class> ... </servlet> <servlet-mapping> <servlet-name>myServlet</servlet-name> <url-pattern>*.jsp</url-pattern> </servlet-mapping>
which statements are true?
1) servlet-mapping element should be inside servlet element 2) url-pattern can't be defined that way. 3) if you make the http call: http://host/Hello.jsp the servlet container will execute MyServlet. 4) It would work with any extension excepting jsp,html,htm
posted 12 years ago
You are correct. The context name seems to be missing there.