14

I have this line of code in my JSP. (I'm using struts 1.3)

<html:form action="screening/mine.do" method="post"> . . . </html:form>

When the action corresponding to mine.do is invoked (using struts-config.xml), the page is getting submitted as GET instead of POST. All the request parameters including the required ones are getting lost due to this. This issue occcurs only in IE-9.

The response remains as POST when I use other versions of IE or any other browsers. How do I make the response to remain as POST in IE-9 ?

EDIT : I observed one more issue in this. Whenever the page is rendered in a new window, this issue occurs. Other places, the POST works fine in IE-9.

Also, this issue occurs in Win7/IE-8, but works absolutely fine in XP/IE-8. Is there something to do with the OS as well???

Any solutions would be useful.

Thanks!!

SrinivasKalburgi
  • 311
  • 2
  • 11

4 Answers4

13

This issue was happening due to a security setting in IE in Windows 7. It also happens in IE-8 of Win-7. (But works fine in IE-8 of Win-XP)

There is an option of Enabling/Disabling protected mode in IE of Windows-7. This is a new feature present in IE of Vista/Windows-7 and this option is enabled by default for “Internet” zone and “Local Intranet” zone(or any one of them). Disabling at these 2 places solved the issue.

Tools -> Internet Options -> Security -> Internet/Local Intranet -> Uncheck on the "Enable protected mode" option.

SrinivasKalburgi
  • 311
  • 2
  • 11
  • I'm glad you wrote *both* the question and the answer, both so I could find them and so I could give you rep for each! Thanks very much. – anton.burger Mar 18 '13 at 17:24
2

TL;DR: Ensure the two sites are in the same zone as well. I had sites in two different zones and calling up the zone stack broke IE.

For anyone that stumbles across this (like I did), but finds that the Protected Mode setting doesn't resolve it, I wrote this up on another thread: https://stackoverflow.com/a/12167814/649249

Resolved it for me.

Community
  • 1
  • 1
Aaron
  • 41
  • 2
0

Try this: method="POST".

The standard specifically states that method can have the value GET | POST (note the caps).

DwB
  • 37,124
  • 11
  • 56
  • 82
  • I tried using POST in caps. Still the response is getting converted to GET.. I also tried using GET as a work-around. But the problem is that, if there are many parameters passes, the URL becomes too long and thus, an error page appears. – SrinivasKalburgi Aug 24 '11 at 08:39
0

We have noticed that there are some security warnings that halt the processing in order for the user to acknowledge. Once the use acknowledges the warning the browser sends a get rather than a post. This has been happening in IE8, not sure if it still happens in IE9.

Tom Hubbard
  • 15,820
  • 14
  • 59
  • 86