You should use servlet mapping. If you have http://myhost/myjsp.jsp the
servlet that call your jsp should be mapped as http://myhost/myservlet . In
this way all the relative links are still good.
An additional hint...... if you map your servlet with an extension, for
instance myservlet.Svlt and use a configuration such as
JkMount /tf/*.jsp ajp13
JkMount /tf/*.Svlt ajp13
all the request not related to tomcat are served by Apache!!!!
andrea
At 13.48 11/12/2000 +0000, you wrote:
> I'm using using forward to pass a request from my servlet to a JSP
> page i.e.ServletContext.getRequestDispatcher ("my.jsp").forward(req,
> res).
>
> This is fine (the JSP gets displayed no problem) but any relative
> links in the JSP get messed up with a "/servlet" in the middle - e.g.
> a graphic referenced as "images/mygif.gif" becomes a link to
> "contextname/servlet/images/mygif.gif" rather than
> "contextname/images.mygif.gif", links to HTML files similarly get
> "/servlet" inserted.
>
> Help ! There must be a simple solution I'm missing here.
>
> Steve Quail.