POST 方法在 IE-9 中转换为 GET [英] POST method getting converted to GET in IE-9
问题描述
我的 JSP 中有这行代码.(我使用的是 struts 1.3)
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>
当调用对应于 mine.do 的操作时(使用 struts-config.xml),页面被提交为 GET 而不是 POST.因此,包括所需参数在内的所有请求参数都将丢失.此问题仅在 IE-9 中出现.
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.
当我使用其他版本的 IE 或任何其他浏览器时,响应仍为 POST.如何使响应在 IE-9 中保持为 POST ?
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 ?
我在这方面又发现了一个问题.每当页面在新窗口中呈现时,就会出现此问题.其他地方,在 IE-9 中 POST 工作正常.
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.
此外,此问题在 Win7/IE-8 中出现,但在 XP/IE-8 中完全正常.和操作系统也有关系???
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.
谢谢!!
推荐答案
这个问题是由于 Windows 7 中的 IE 中的安全设置而发生的.它也发生在 Win-7 的 IE-8 中.(但在 Win-XP 的 IE-8 下工作正常)
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)
Windows-7 的 IE 中有启用/禁用保护模式的选项.这是 Vista/Windows-7 的 IE 中的一项新功能,默认情况下为Internet"区域和本地 Intranet"区域(或其中任何一个)启用此选项.在这两个地方禁用解决了这个问题.
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.
工具 -> Internet 选项 -> 安全 -> Internet/本地 Intranet -> 取消选中启用保护模式"选项.
Tools -> Internet Options -> Security -> Internet/Local Intranet -> Uncheck on the "Enable protected mode" option.
这篇关于POST 方法在 IE-9 中转换为 GET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!