Will Stranathan wrote:

Not positive I completely understand the question, so I'll make a very vague response.

Yeah, after I read it I didn't make much sense to myself either. :-P



You can:
1) Use the input attribute of an Action to specify the page that fed it - if the validate() method on the ActionForm() returns a non-empty ActionErrors, the user will go back there.

This sounds pretty good to me. Would I be breaking any unwritten rules if I used that to return the user to the page from which they came even if there weren't errors?


2) Specify a <forward /> for the Action that sends the user back to from whence they came.

I don't think I can do this because they may come from a number of pages.


3) Use request.getHeader("referer") to find out the page that got you here. But you need to be careful - it's NOT mandatory for a client to send this header. And you won't be able (AFAIK) to return a proper ActionForward for it - you'll just have to redirect the request and return null.

I guess it might make more sense if I created an example. You click on a link to an item in a store or something online. That link you click on points to the exact page or some such, but when you go to get into that page it has a little thing that checks to see if you're logged in. If you're not logged in it redirects you to the login page. Once you log in it takes you directly to the page you were trying to reach, whatever it may have been. Does that help?
Brandon


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to