tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hankin" <kei...@addr.com>
Subject Re: 'referer' header contains Servlet path, not referrer
Date Sat, 11 Sep 2004 06:30:01 GMT
OK, I tried the 'history.go(-1)' solution. That *did* go back to the proper
page. However, it shows the page as it was before the user entered data,
forcing the user to re-enter all of their data, not just the field in error.
All I need to do is determine what the last page was so that I can forward
the existing request to it.

----- Original Message -----
From: <erh@swapsimple.com>
To: "'Tomcat Users List'" <tomcat-user@jakarta.apache.org>
Sent: Friday, September 10, 2004 8:15 PM
Subject: Re: 'referer' header contains Servlet path, not referrer


> On Fri, Sep 10, 2004 at 12:58:30PM +0200, Bedrijven.nl wrote:
> > I think you should use struts.
> How would that help?  Struts is completely useless for figuring out
> which page a user came from.
>
> > -----Oorspronkelijk bericht-----
> > Van: Keith Hankin [mailto:keithh@addr.com]
> > Verzonden: Friday, September 10, 2004 11:52 AM
> > Aan: Tomcat Users List
> > Onderwerp: Re: 'referer' header contains Servlet path, not referrer
> >
> >
> > My code is in the Servlet, and I can't access Javascript within the
Servlet.
> >
> > > Keith Hankin wrote:
> > >
> > > > Here's the scenario: I am getting input data from the user and have
> > > > determined that the user has made an error. I want to redisplay the
last
> > > > page so they can fix the errors.
>
> well, your servlet could generate a small page that has the javascript
> in it.  (although then it would be javascript:history.go(-2) instead
of -1)
> If you have control over the input page (and feel like changing it)
> you could always add a hidden form field that describes which page the
user
> is looking at.  You could even use a bit of javascript (hiddenfield.value
=
> location.href) to grab the url.  Probably not the best way to do this,
> however.
>
> eric
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


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


Mime
View raw message