my dog learned polymorphism
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 Java Interview Guide this week in the Jobs Discussion 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: 42965
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.
I agree. Here's the link:
subject: Problem with URL-PATTERN tag
It's not a secret anymore!