| Author |
how would i redirect in struts
|
john mattucci
Ranch Hand
Joined: Nov 03, 2000
Posts: 331
|
|
If im in page a.jsp and some error throws me to b.jsp what is the easiest way to redirect in struts. I have tried to read some tutorials but im quite strapped for time and I was hoping someone would have a simple example that I could use. I need to remember which page the user came from since it could come from any page to b.jsp not only a.jsp. Thank you all for your time
|
 |
somkiat puisungnoen
Ranch Hand
Joined: Jul 04, 2003
Posts: 1312
|
|
you should use global action like this :: This will help you.  [ January 24, 2005: Message edited by: somkiat puisungnoen ]
|
SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
|
 |
john mattucci
Ranch Hand
Joined: Nov 03, 2000
Posts: 331
|
|
|
Ok maybe im lost but I dont see how that will send me back to the original page once the action is completed. What I want to check is if the user is in session in any page i.e. jsp. If he is he can proceed otherwise send him to logon.jsp and once logged on send him back to the page that he was on.
|
 |
somkiat puisungnoen
Ranch Hand
Joined: Jul 04, 2003
Posts: 1312
|
|
What I want to check is if the user is in session in any page i.e. jsp.
you can do like this :: 1. check in Action Class 2. Check in jsp page :: - use struts -tag lib :: present or notpresent - create some util class to check that and call it in jsp page. - create your custom taglib to do that.
|
 |
 |
|
|
subject: how would i redirect in struts
|
|
|