我旁邊來源:JSP的getParameter(IE問題)
<form action="relogin.jsp" method="post">
<input type="text" id="authname" name="login" value="<%=login%>" tabindex="1" title="<%=bundle.getString("[Login]")%>" />
<input type="password" name="pwd" id="authpass" value="" tabindex="2" title="<%=bundle.getString("[Password]")%>" />
<input type="submit" name="enter" value="<%=bundle.getString("[Enter]")%>" class="proaction" tabindex="3" title="<%=bundle.getString("[Enter]")%>" />
</form>
我保持我的JSP文件中的參數:
<%if (request.getContentLength() == 0) { .[IE6,7 goes here]. } else { .[Chrome and FireFox goes here]. } %>
正如你可以看到我有維護後參數提交的表單的問題IE6,7。在Chrome和FireFox中一切正常。在這兩種情況下,我使用Apache Tomcat並且日誌文件不包含任何錯誤。
有什麼建議嗎?
我本地化我的問題。我在自己的計算機上部署我的頁面(Ubuntu 10.04,JVM 1.6.0_20,Apache Tomcat 6.0.28)並且一切正常。然後我將我的Tomcat與測試頁複製到生產性服務器(Windows Server 2003,JVM 1.6.0_20,Apache Tomcat 6.0.28),並遇到我上面提到的問題。 – 2010-08-23 10:20:49
我以調試模式運行頁面。我看到'request.postdata'包含值,但最終它們不被解析。 – 2010-08-23 10:39:29