struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Collins" <>
Subject URL response from servlet
Date Wed, 24 Jul 2002 10:18:59 GMT

First of all, I'm not sure if this is a struts or general Servlet/JSP/JavaScript
issue (not good start!), but thought I'd give this a go, apologies in advance if
I'm off the beaten track.

When we run a struts servlet (i.e. /, the mappings in struts-config.xml
will return query.jsp (as the input if any errors occur) or results.jsp (as the
successfull completion of the query).
However, when you check the URL in the resulting window (using either
window.location or window.document.URL) what I get is the URL of the servlet
(i.e. / Is there any way to get the URL of the "real" content, i.e.
the JSP page? The <html:base> tag on the page seems to manage it (I checked
using view source in the browser), but I'm guessing there is a really important
reason why the URL is returned the way it is?

The problem we have which has lead to this, is we have an application that has
lots of different query and results pages, but has a special status page you can
go to from anywhere in the application.  It's done with multiple frames and
JavaScript, so the user clicks on a button in a separate frame which saves the
URL of the "main" page, goes to the status and afterwards returns the user back
to where they were by using history.go and the saved URL.

This works fine when the URL is query.jsp, but when it is /, I run into
problems (but only when we use SSL!) when the code tries to reload the saved URL
I get a page from IE about "Warning: Page has expired" and it says I need to
refresh to resubmit the form (which does work, but we don't want users to have
to do that).
If I do a refresh it does resubmit the query, the servlet/action re-runs and the
page is refresh, but why do I only need to do this if I run SSL? I guess that in
"non-secure" mode, IE will refresh a page that is the result of a form
submission, but in secure mode it won't (which does make sense), is that right?

Is there any way to do what we want (or are we in a big oops!), can we get the
real URL of the JSPs from the results of the servlet or do we need to change the
way the back button on our status page works.



 Tertio Telecoms Limited  -  One Angel Square,   Torrens Street,   London  EC1V
Tel: +44 (0)20 7843 4000 Fax: +44 (0)20 7843 4001 Web
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of Tertio Ltd.

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

View raw message