• Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubt in the Eduardo Cobian exam

 
Deep Chand
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Sivasundaram Umapathy
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are correct. The context name seems to be missing there.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!