File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes need help! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "need help!" Watch "need help!" New topic

need help!

Ranch Hand

Joined: Oct 09, 2003
Posts: 517

what is the meaning of this type of url definition.



God Gave Me Nothing I Wanted<br />He Gave Me Everything I Needed<br /> - Swami Vivekananda
Ranch Hand

Joined: Oct 09, 2003
Posts: 517
Got answer....

If we want to use path prefix mapping, we
have to do like this:


Does that mean we can map to myServlet like this now?

Anand Wadhwani
Ranch Hand

Joined: Mar 21, 2005
Posts: 151
Very well yes!

The url-pattern defines the virtual name for your servlet class. This name would appear in the URL which in turn appears to client of your website. So this is a good way of hiding your actual servlet class name from client. At the same time it gives to ability to define virtual (logical) directories appearing in URL which are not actual directories on your server!

Also please note that you cannot invoke your servlet without mapping to a url-pattern. It's mandated by container!

Hope this helps.

SCWCD 1.4<br />---------------------<br />Ability is what you're capable of. <br />Motivation determines what you do. <br />Attitude determines how well you do it.<br />---------------------
I agree. Here's the link:
subject: need help!
It's not a secret anymore!