• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet Mapping

 
Padma priya Gururajan
Ranch Hand
Posts: 437
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

As per HFSJ, How is the below servlet mapping correct(pg:614)?
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>com.myorg.ActionClass</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>/controller</url-pattern>
</servlet-mapping>


Please explain?


Thanks in advance.
 
Ashok Kumar Babu
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For me it seems to be correct only. May I know your doubt on this?
 
Padma priya Gururajan
Ranch Hand
Posts: 437
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I got confused with the word "controller".

Thanks.
 
Fernando Lamsen
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Padma, it is correct and the reason is that it "obeys the proper declaration" of servlet and servlet-mapping tags, provided that they are under the web-app tag. Don't be confused to the word /controller, there's no such special meaning on it.

Ferdz,
SCJP, SCWCD
 
Ash More'
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey padma,
it seems you have just read from HFSJ. You atleast read another SCWCD book(links to books are provided in the SCWCD links page).That way many of your doubts will be cleared. Its sometimes helpful to understand(or attack!!) a subject from two or more points of view.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic