tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike W-M" <>
Subject Re: JSP to Servlet to JSP pathing issue. Relative Pathing Please help.
Date Mon, 16 Dec 2002 18:00:29 GMT
If you want the path in the browser's address bar to change, I think you
have to use a "redirect" rather than a "forward".  (I've read that even then
it's not guaranteed to work (since it's browser-dependent), but it's working
fine for me.  There's the disadvantage of an additional network round-trip
that's not ideal, but I don't know of any other way.)
[Actually, I guess you're already redirecting from the original jsp request
to the servlet.  If you changed that to "forward" then that'd probably solve
you're problem without the additional round-trip....]


----- Original Message -----
From: "Jason Johnston" <>
To: "<"Tomcat Users List"" <>
Sent: Monday, December 16, 2002 5:46 PM
Subject: JSP to Servlet to JSP pathing issue. Relative Pathing Please help.

I have a JSP that has a form that I want processed by a servlet.  The
servlet then places the results in the page context and redirects back
to the JSP.

Everything works fine on the first go, but the second time through the
path in the client's browser is no longer valid.

Initially, the path is:


This then sends the form data to the

The servlet executes and uses the request dispatcher to load the
original JSP.


The original JSP comes up fine and has the results, but the path in the
browser URL is still the servlet address.  Since the form sends to a
relative path, the second time you try to run, it doesn't work.


This seems to be a very simple relative pathing problem, but I've tried
various solutions with no luck.  I'm sure someone else has run into this
and found a solution.  If anyone has any insight, please help.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message