aspose file tools*
The moose likes Servlets and the fly likes question about servlet-mapping url-patterns Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "question about servlet-mapping url-patterns" Watch "question about servlet-mapping url-patterns" New topic
Author

question about servlet-mapping url-patterns

Jon Bricker
Greenhorn

Joined: Feb 28, 2003
Posts: 23
I have a servlet mapping that looks something like this

<servlet-mapping>
<servlet-name>myServlet</servlet-name>
<url-pattern>/myServlet</url-pattern>
</servlet-mapping>

What is being passed in looks like this www.example.com/myServlet?id=fas46t2

I would think the above mapping would catch it but it is getting a 404. Do I need to make some changes to account for the parameter being passed in?

I should add that this is running on Tomcat 7.0.5 and this is an outside call trying to reach the servlet.

thanks for the help.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61648
    
  67

Looks like you are missing the context path in the URL.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jon Bricker
Greenhorn

Joined: Feb 28, 2003
Posts: 23
Bear Bibeault wrote:Looks like you are missing the context path in the URL.


That was it. thanks for the help.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61648
    
  67

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: question about servlet-mapping url-patterns