Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet not mapping to URL  RSS feed

 
Bill Clar
Ranch Hand
Posts: 163
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a servlet that is not mapping to my URL:



When I try to call the Servlet from a JSP:



The resulting link is http://localhost:9080/View/viewFlow?V1. It's bypassing the project name. The link should be http://localhost:9080/TestFlow/View/viewFlow?V1.

Any suggestions?
 
Stefan Evans
Bartender
Posts: 1836
10
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You want the FAQ on Relative Links


That should point you towards injecting the project name into the url like so:


An alternative is to use the <c:url> tag which injects it automagically.

 
Bill Clar
Ranch Hand
Posts: 163
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Stefan!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!