File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes url-pattern tag of servlet-mapping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "url-pattern tag of servlet-mapping" Watch "url-pattern tag of servlet-mapping" New topic

url-pattern tag of servlet-mapping

Lalit Kapoor

Joined: Jun 06, 2004
Posts: 20
Can anyone tell me how to use <url-pattern> tag and why is used?
Ikram Soomro
Ranch Hand

Joined: Oct 20, 2001
Posts: 42
Can anyone tell me how to use <url-pattern> tag and why is used?

<servlet-name> login</servlet-name><servlet-class> </servlet-class>

<servlet-name> login</servlet-name>
<url-pattern> *.html </url-pattern>



you can apply pattern on any url in your web application.
If some url contain any name . html than it should be referred to LoginServlet

Ikram Soomro
I agree. Here's the link:
subject: url-pattern tag of servlet-mapping
It's not a secret anymore!