您的位置:首页 > 移动开发

In Websphere Application Server 6.1 , request.getQueryString() return null.

2008-07-24 16:17 501 查看
上午同事将在tomcat5.5测试过的代码提交到测试环境was6.1, 发现一些页面失效.
察看browser端源代码发现 request.getQueryString()返回null.

查到了几则资料, 今天不上班, 还没有时间去解决, 在这里记录一下.

1. PK17272: GETQUERYSTRING RETURNS A NULL VALUE WHEN SERVESERVLETSBYCLASSNAMEENABLED="TRUE"
2.Changes made to J2EE API HttpServletRequest.getQueryString()
3.Java Technologies for Web Services - Problem with request.getQueryString() in Websphere Application Server

解决办法(发扬拿来主义)
The null value is returned by request.getQueryString() is due to change
in requestdispatcher implementaion in servlet 2.4 specification. The error can by resolved by using
request.getAttribute("javax.servlet.forward.query_string") instead of
request.getQueryString() .
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: