我旁边来源: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