Issue
I am currently designing a small website using JSP / Servlets. Tomcat is very picky about my routes.
- My application can be entered throught the path
/Final
(on a localhost I havehttp://localhost:8088/Final
).
- My main JSP page is at
http://localhost:8088/index.jsp
. On that page, I have a navbar with several links. On one of those links, the "Home" link, I have thehref
set to/Final/index.jsp
. When I hover over the link, it shows the links path ashttp://localhost:8088/Final/Final/index.jsp
.
At first, I said ok, lets just change the href to index.jsp
, but when I do that, the link now points to http://localhost:8088/index.jsp
which will not satisfy the server. Why are links behaving like this? How can I get it to point to http://localhost:8088/Final/index.jsp
without fully qualifying it?
Solution
Apparently, adding the .
before the path as in ./index.jsp
works just fine.
Answered By - James Parsons