Hi,
Please bear with me if it has been asked earlier. I have an application named as app and deployed at
tomcat 5.5.30.
In this app I have a header.jsp file which contain the absolute url link as follow
header.jsp
Now when I try to click this url from browser, I expected it to go to "http://localhost:8080/app/secure/publisher/create.htm".
But it is going to "http://localhost:8080/secure/publisher/create.htm". This
jsp file is deployed under a webapp called as app(the name of the application can change however) so I thought that all absolute urls should start with the name of application context "app" but it is taking the tomcat default context "/".
I can't modify the tomcat configuration file because they are not accessible to me so I can't set the root context etc. Also my webapp can be deployed with different names depending upon the production environment or
testing environment so i do not want to hard code anything in the url links like
"<a href="{application-name-here}/secure/publisher/create.htm">Add new publisher</a>"
Please help me out.
PS: Earlier in my php/html days, I saw that absolute urls worked starting from application context rather than apache local root folder so I thought it would be same in tomcat as well.
Thanks in Advance.
Ahsan