You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jureczky Bálint <ba...@siemens.com> on 2005/05/26 10:05:50 UTC

welcome file handling

Hello All,
 
We had problems with welcome-file handling after Tomcat upgrade. The welcome
file points to page like /dir1/dir2/index.jsp. The page is found despite the
fact that the servlet specification says leading / is not allowed, this is
valid in all Tomcat versions I know. 
 
The exact problem is that the behavior when I try to access webapp/dir1 via
browser is different in tomcat versions 4.1.29 and 5.0.28. In 5.0.28 the
pages in the frames are not displayed, they are not found in 4.1.29.
 
index.jsp uses framesets and relative paths to reference the elements of the
frame. I had the idea that maybe the mechanism how the welcome files are
displayed (redirect / forward) is changed, between the versions.
 
Do you know what is the difference which causes this behavior? Do you know
any workaround?
 
Thank you,
 
Balint Jureczky

Re: welcome file handling

Posted by Tim Diggins <su...@red56.co.uk>.
Don't know about the difference, but a couple of potential workarounds:

1) could be to have your welcome page just be the default index.jsp and 
have it just contain a redirect to the relevant page (but this will mean 
a response-request roundtrip for your user).

2) alternatively you could include a <base href="(absolute url)"> in the 
body of your frameset, but this would add a dependency on your server 
name, port, and context path in your html (yuck), but you could get 
around this with something from JSTL (which I don't know so well, but 
something like <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<c:url value="dir1/dir2/index.jsp"/>).

Tim

Jureczky Bálint wrote:
> Hello All,
>  
> We had problems with welcome-file handling after Tomcat upgrade. The welcome
> file points to page like /dir1/dir2/index.jsp. The page is found despite the
> fact that the servlet specification says leading / is not allowed, this is
> valid in all Tomcat versions I know. 
>  
> The exact problem is that the behavior when I try to access webapp/dir1 via
> browser is different in tomcat versions 4.1.29 and 5.0.28. In 5.0.28 the
> pages in the frames are not displayed, they are not found in 4.1.29.
>  
> index.jsp uses framesets and relative paths to reference the elements of the
> frame. I had the idea that maybe the mechanism how the welcome files are
> displayed (redirect / forward) is changed, between the versions.
>  
> Do you know what is the difference which causes this behavior? Do you know
> any workaround?
>  
> Thank you,
>  
> Balint Jureczky
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org