Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DD Doubt....

 
Pooja Shankar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<servlet>
<servlet-name>servlet1</servlet-name>
<servlet-class>com.whatever.myServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>servlet1</servlet-name>
<url-pattern>/my/test/firstPage</url-pattern>
</servlet-mapping>

Here we are mapping a url-pattern to the class in the <servlet-name> element, ie. on typing http://....../my/test/firstPage we get the myServletClass invoked. but to account for the following.(/my/test/*)
<servlet-mapping>
<servlet-name>servlet1</servlet-name>
<url-pattern>/my/test/*</url-pattern>
</servlet-mapping>
Thanx in Advance.
[ April 02, 2005: Message edited by: Pooja Sharma ]
 
Jose Esteban
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, but what's your question?
 
Mishra Anshu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Sorry, your question was not clear.
But, if you want to know what this mapping means, then it is simply
going to invoke the servlet1 if any url-pattern (such as http://whatever/
my/test/'whatever')is requested.

One common example for it is, the Action Controller Servlet (Which is made to be invoked for all the requset matching a particular pattern, commonly all the requests for a particular web application...but not necessarily..)
 
Pooja Shankar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mishra Anshu ,
Thanx I got the answer.
Pooja
[ April 03, 2005: Message edited by: Pooja Sharma ]
 
James Christian
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think she wanted to know which rule takes precedence. The order is

1) EXACT-MATCH
2) DIRECTORY-MATCH
3) EXTENSION-MATCH

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic