This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

servlet mapping  RSS feed

 
dolly shah
Ranch Hand
Posts: 383
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have doubt on chapter:11, selftest example:10 form HFSJ book.

Why option "A" is correct? <servlet-class>com.myorg.ActionClass</servlet-class>-there is no .do extension in the class name. Can anyone please clear my doubt?
 
vitesse wei
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<servlet-name> is just for internal us,it's only a name
<servlet-class> must be real class name or full-qualified class name
A is correct,because this servlet will be mapped to any url patterns fall into *.do wild pattern,thant means xx.do and yyy.do will mapped to this servlet.
C is right ,because this servlet was mapped to only pattern which is controller.
hope it's clear to you.
 
dolly shah
Ranch Hand
Posts: 383
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks vitesse. I got it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!