tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob <rob_m...@softhome.net>
Subject Re: relative path/context problem
Date Wed, 11 Sep 2002 16:53:23 GMT
What servlet mapping(s) do you have setup in web.xml?

Dave Robbins wrote:
> Hello All,
> 
> I'm seeing some really odd behaviour, I hope someone can tell me what i'm 
> doing wrong. I've written some jsp/servlet code with Forte 4.0, created a 
> war file and deployed it on Tomcat 4.0.4. ( I deployed it by putting the 
> war file in the webapps dir and restarting Tomcat) The war file was 
> my_stuff.war so the url is 
> 
> http://localhost:8080/my_stuff/index.jsp
> 
> That works fine. As I started developing a little code I got to a point I 
> wanted a link back to the entry of the site, I thought
> 
> <a href="/index.jsp">Back to Top</a>
> 
> would do the job. But this link pointed to
>   
> http://localhost:8080/my_stuff/servlet/index.jsp
> 
> I was confused so to simplify things I went back to index.jsp and put a 
> link to itself in the file. When you mouse over the link, the address it 
> point to is
> 
> http://localhost:8080/index.jsp
> 
> Shouldn't Tomcat be prepending
> 
> http://localhost:8080/my_stuff
> 
> onto any link I specify like this
> 
> <a href="/somefile.jsp">My Link</a>
> 
> I'm playing around with what's called a model 2 architecture where a jsp 
> page calls a servlet which does some data processing and then forwards the 
> request to another jsp page and I'm not having any trouble with path's when 
> I forward the request, just with links in the jsp pages.
> 
> what's really maddening is that in playing around with this I've seen it 
> work correctly and seen it fail. Obviously I'm doing something boneheaded, 
> any ideas??
> 
> Dave
> 
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
> 
> 



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


Mime
View raw message