This week's book giveaway is in the
Agile and other Processes
forum.
We're giving away four copies of
The Mikado Method
and have Ola Ellnestam and Daniel Brolund on-line!
See
this thread
for details.
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Java
»
Servlets
Author
question about servlet-mapping url-patterns
Jon Bricker
Greenhorn
Joined: Feb 28, 2003
Posts: 23
posted
Jan 26, 2011 13:07:44
0
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: 56222
13
I like...
posted
Jan 26, 2011 14:48:14
1
Looks like you are missing the context path in the URL.
[
Smart Questions
] [
JSP FAQ
] [
Books by Bear
] [
Bear's FrontMan
] [
About Bear
]
Jon Bricker
Greenhorn
Joined: Feb 28, 2003
Posts: 23
posted
Jan 27, 2011 05:36:40
0
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: 56222
13
I like...
posted
Jan 27, 2011 11:02:42
0
subject: question about servlet-mapping url-patterns
Similar Threads
advantage of using servlet-name element in DD
How to declare/override Weblogic's ServletInvoker in web.xml
How to specific numerous url-patterns in web.xml
Servlet doesn't pick initial parameter
can I do this in servlet-mapping?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter