Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 redirectAction issue in IE6

 
Santosh Sb
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't seen that problem; you may have to provide further information. Is your IE debugging turned on?
 
Santosh Sb
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, ok; glad to hear you worked it out.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic