Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

servlet mapping

 
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.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!