今天作分页功能遇到这样子的问题:java
表单用get方法传含有"%"字符参数,返回页面的连接中包含该参数,点击该连接出现:apache
org.apache.tomcat.util.http.Parameters processParameters
Warning: Parameters: Character decoding failed. Parameter skipped.
java.io.CharConversionException: EOFtomcat
当get方式提交表单时 "%"会被转换成"%25",而在把参数写回页面的连接时,并无作相关的encode.url
另外发现Firefox和IE的状态栏显示的url有点不一样:code
在Firefox中,状态栏提示的url是否是a标签中href的字面值,应该经decode过的url,
而在IE中,状态栏提示的就是a标签中href的字面值。
如一样的 <a href="http://localhost:8080/a/action.do?name=%251&p=2">test encoding</a>
在FireFox的状态栏显示的是: http://localhost:8080/a/action.do?name=%1&p=2,
在IE中是:http://localhost:8080/a/action.do?name=%251&p=2
固然,点击该连接,地址栏中的地址都就是http://localhost:8080/a/action.do?name=%251&p=2同样的了。ip