hi.

I am having issues with relative urls inside of the login-form page.
I'm wondering what the expected behavior is, and if other expect tomcat to
work differently..  below is an attempt at describing what's going on.




The problem is that the base url changes depending on the resource that
was requested when the log-in form is launched.


The images are under the /myapp/images/* directory.  The login page is
under /myapp/login.jsp, and so the relative urls look like:
"./images/image.jpg"



So if I go to a resource at the same level as the login.jsp is works:

http://localhost:8080/myapp/index.jsp



but if I go to a resource at a different level the relative urls break:

http://localhost:8080/myapp/SomeSubDir/index.html


Tomcat puts a <BASE HREF="http://localhost:8080/myapp/SomeSubDir/"> at the
top of the returned page..  And as far as the browser is concerned, it is
looking at the requested resource (
http://localhost:8080/myapp/SomeSubDir/index.html ). so all relative urls
are relative to the new resource directory.. not the real login.jsp
resource directory...



Reply via email to