aspose file tools*
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

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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
jQuery in Action, 2nd edition
subject: url-pattern tag of servlet-mapping