Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Forward back to same page in Struts

843836Apr 7 2005 — edited Aug 5 2005
Hey guys,

i've butsted my brain on this one for a while and can't find the solution. any help is much appreciated!

i have a login form that appears on every single page of the website i'm developing. A requirement of the application is that when the user chooses to log in using the login form, they will simply come back to the same page they were on before they logged in.

So in the struts action, i'd like to do the login logic, and the foward back to the "input" page. in the struts-config file there is a attribute in the action declaration input="someurl" but as the login form appears on all pages, the input page is could be anything so it can't be set in the struts-config.

so my question is, how can i find out what the input page was?

there are a couple of other cases where i need to forward back to a dynamic input page as well. it's a pretty simple idea and i'm sure i'm not the first person who needs to do it. how have other people solved this problem using struts?

I've i can't find a way to do it i'm going to have to implement filter that keeps track of the user's current page and stores it in session where it can be retrieved by an action for forwarding. but that's as a last resort because i'm hoping struts has a way!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 2 2005
Added on Apr 7 2005
4 comments
696 views