This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Tomcat and the fly likes Problem with URL-PATTERN tag 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 » Products » Tomcat
Bookmark "Problem with URL-PATTERN tag" Watch "Problem with URL-PATTERN tag" New topic

Problem with URL-PATTERN tag

mithun gooty
Ranch Hand

Joined: Mar 14, 2006
Posts: 33
I have problem giving the url-pattern information in web.xml file. I have a created a servet ServletExample and the url-pattern entry for this servlet looks like this:


The servlet class is directly under the classes folder. When i try to run this servlet from Tomcat with http://localhost:8080/PostServlet URL, I get the following error:

The requested resource (/ServletExample) is not available.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41591
The URL seems is missing the name of the web app; it should be something like http://localhost:8080/MyWebApp/PostServlet. Or are you modifying the ROOT context? I wouldn't recommend that.

Ping & DNS - my free Android networking tools app
I agree. Here's the link:
subject: Problem with URL-PATTERN tag