| Author |
What if browser request url matches two Url patterns defined in two differnet <servlet mappings> tag
|
Abhineet Kapil
Ranch Hand
Joined: Feb 08, 2010
Posts: 42
|
|
Hi
In web.xml
Now the request that comes from browser is >> Http://localhost:8080/MyConfusedApp/test
In such case please tell which servlet will be invoked as the request matches both the url patterns....
|
 |
Deepak Bala
Bartender
Joined: Feb 24, 2006
Posts: 6603
|
|
|
The URL does not match either pattern
|
SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
|
 |
kamal preet
Greenhorn
Joined: Sep 11, 2006
Posts: 3
|
|
I have taken two servlets with the same url pattern :
And I hit below url on the browser :
http://localhost:8080/ServletTest/test1
In such a scenario when the requested url exactly matches 2 or more url patterns, Container traverses through the web.xml and invokes the last matching servlet.
So in the above case servlet Test1 gets invoked..
|
 |
Abhineet Kapil
Ranch Hand
Joined: Feb 08, 2010
Posts: 42
|
|
Thanks KP
|
 |
 |
|
|
subject: What if browser request url matches two Url patterns defined in two differnet <servlet mappings> tag
|
|
|