• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

DD?

 
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,
 
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>
 
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 ]
 
ranger
Posts: 17346
11
Mac IntelliJ IDE 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
 
Does this tiny ad smell okay to you?
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic