Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • 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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic