wood burning stoves 2.0*
The moose likes Struts and the fly likes Struts 2 redirectAction issue in IE6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 redirectAction issue in IE6" Watch "Struts 2 redirectAction issue in IE6" New topic
Author

Struts 2 redirectAction issue in IE6

Santosh Sb
Greenhorn

Joined: Nov 04, 2009
Posts: 10
Hello Folks,

I have noticed this wierd issue with my redirects not working in IE6. Works in IE7,8 and FF2.x an 3.x.

I have a home page that has the following in struts.xml -



The home.jsp page has the following form tag






When I click the submit button on home.jsp, it goes to the post method in HomeAction. The method returns SUCCESS and I would expect struts to redirect to the display method in PolicyAction. But the control never comes to PolicyAction in IE6 and the browser stays on the first page itself. It works in other browsers, but not IE6. Makes me think that the redirectAction in



code above is somehow not working. It does execute the post. Since it is supposed to be a client side redirect that results in a GET after a POST and redirect, is it possible that struts2 is using some newer flavor of client side redirect that is not understood by older browsers? Can some guru share their expertise. Thanks!
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I haven't seen that problem; you may have to provide further information. Is your IE debugging turned on?
Santosh Sb
Greenhorn

Joined: Nov 04, 2009
Posts: 10
We found the root cause and solution to this problem. This has nothing to do with Struts 2.

I was using a css button with javascript to submit the form. Problem is after the form was submitted the browser was aborting the request, so the response was ignored by the browser and it never refreshed the page. We added a return false after the document.forms[0].submit() and that fixed it for IE6.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Ah, ok; glad to hear you worked it out.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2 redirectAction issue in IE6