I think it is correct. It should invoke myServlet. Your mapping is type of path mapping. As the Path mapping is defined in web application, it will not search for welcome pages. It will always invoke the servlet.
I think it wont invoke the servlet that u specified in DD. Reason is u have put http://localhost:80/MapTest/serve and not http://localhost:80/MapTest/serve/. You configured the DD to map to the URLs that are accessing anything inside the directory only. So in this case container will search for an exact match. If it is not there it will throw a 404.
SCJP 1.4, SCWCD 1.4, SCBCD 1.3, NEXT--->IBM XML
Joined: Dec 04, 2004
You configured the DD to map to the URLs that are accessing anything inside the directory only. So in this case container will search for an exact match.
When the container will search for exact match ? when the URL mapping is defined for exact match. Here in DD the mapping is defined for path mapping, and not for exact match. So it alway invoke myServlet.
If you are reffering Servlet Specs.(2.4), there are very good examples on page 87 how the incoming URLs are mapped to Servlets.
Hope it help you.
Joined: Mar 29, 2004
Thanks friends! Even i was thinking it will invoke only if '/' is there in the end.. now i am clear.