| Author |
DD Doubt....
|
Pooja Shankar
Greenhorn
Joined: Mar 29, 2005
Posts: 16
|
|
<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
Joined: Nov 28, 2004
Posts: 102
|
|
|
Sorry, but what's your question?
|
 |
Mishra Anshu
Ranch Hand
Joined: Sep 16, 2003
Posts: 224
|
|
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..)
|
"Ignorance is bliss"
|
 |
Pooja Shankar
Greenhorn
Joined: Mar 29, 2005
Posts: 16
|
|
Mishra Anshu , Thanx I got the answer. Pooja [ April 03, 2005: Message edited by: Pooja Sharma ]
|
 |
James Christian
Ranch Hand
Joined: Apr 04, 2005
Posts: 63
|
|
I think she wanted to know which rule takes precedence. The order is 1) EXACT-MATCH 2) DIRECTORY-MATCH 3) EXTENSION-MATCH
|
 |
 |
|
|
subject: DD Doubt....
|
|
|