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

DD?

 
tony lee
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,
I encountered a quize:
To map a specific URL to your servlet,
which element must be included in your Deployment Descriptor?
One of the choice is:
1) <!ELEMENT servlet-pattern (servlet-name, url-pattern)>
2) <!ELEMENT servlet-mapping (servlet-name, url-pattern)>
3) <!ELEMENT servlet-mask (servlet-name, url-pattern)>
4) <!ELEMENT servlet-url (servlet-name, url-pattern)>
I never find such kinds of expression in DD. What does it mean?
Thanks,
 
Goan Balchao
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer is 2.
The <servlet-mapping> element is used to map a given servlet<servlet-class> or JSP file <jsp-file> to a URL pattern
e.g
<servlet-mapping>
<servlet-name>MyServlet</servlet-name>
<url-pattern>/*</servlet-name>
</servlet-mapping>
 
Anthony Villanueva
Ranch Hand
Posts: 1055
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For more info, the Servlet 2.3
specs has an appendix on Deployment Descriptor 2.2.
-anthony
[ April 01, 2002: Message edited by: Anthony Villanueva ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or download ersin's Deployment Descriptor diagram. It is a great visual representation of the DD. It is on the link's page above.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic