File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts2 - A Query about Redirect Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 - A Query about Redirect " Watch "Struts2 - A Query about Redirect " New topic

Struts2 - A Query about Redirect

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,

I have some confusion in understanding Struts Redirection .Please help :

I have a user form with username and password text fields and two buttons for Submit and Cancel as shown below :

The struts.xml file contains these things :

I really don't understand what is the use of this line
<result name="cancel" type="redirect">loginCancel.jsp</result>

Is the above action CancelForm is not suffcient here ??

Please share your ideas .

Thank you.

Save India From Corruption - Anna Hazare.
David Newton

Joined: Sep 29, 2008
Posts: 12617

Without any context it's impossible to answer that question.
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

The context is that upon pressing the Cancel button on to the Login.jsp , the user should be redirected to the logincancel.jsp page .

I agree. Here's the link:
subject: Struts2 - A Query about Redirect
It's not a secret anymore!