Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question about servlet-mapping url-patterns

 
Jon Bricker
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64835
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you are missing the context path in the URL.
 
Jon Bricker
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64835
86
IntelliJ IDE Java jQuery Mac Mac OS X
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic