This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet mapping not working as expected

 
shivang sarawagi
Ranch Hand
Posts: 155
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

My servlet mapping in web.xml is not working fine. I have double checked but not sure what is the issue.
Can anyone please help.

Here is my servlet mapping




from login.jsp which is under webContent/jsp/login.jsp



I am submitting the form. But on clicking submit I don't know why the flow is going to this path

"http://localhost:8080/ShoppingCart/jsp/ValidateUser"

the servlet is under src/org.techniker. The flow should rather go to org.techniker package

I am getting the error http 404 resource not found.

Please help
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because you are using a page-relative URL in the action. Use a server-relative URL that starts with the context path. See the ServletsFaq fro more information.
 
shivang sarawagi
Ranch Hand
Posts: 155
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Sir !! The spec cleared my concept on using relative links in a web app.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic