警告: Parameters: Character decoding failed. Parameter skipped

来源:转载

org.apache.tomcat.util.http.Parameters processParameters

警告: Parameters: Character decoding failed. Parameter skipped.

java.io.CharConversionException: EOF

    at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:83)

    at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:49)

    at org.apache.tomcat.util.http.Parameters.urlDecode(Parameters.java:412)

    at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:394)    at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:510)
    at org.apache.tomcat.util.http.Parameters.handleQueryParameters(Parameters.java:267)
    at org.apache.catalina.connector.Request.parseParameters(Request.java:2441)
    at org.apache.catalina.connector.Request.getParameterNames(Request.java:1082)
    at org.apache.catalina.connector.Request.getParameterMap(Request.java:1062)
    at org.apache.catalina.connector.RequestFacade.getParameterMap(RequestFacade.java:414)
    at org.apache.struts2.dispatcher.Dispatcher.createContextMap(Dispatcher.java:527)
    at org.apache.struts2.dispatcher.ng.PrepareOperations.createActionContext(PrepareOperations.java:78)
    at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:78)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)

 

引起的原因:有get方法进行查询分页,而URL中包含"%",本来是个警告,以为没什么关系。但把每个页面做完后,发现个大问题,哭死。。。就是传中文的时候有乱码,当然,这个问题是由get传递机制造成的,与这个警告没关系^_^

 

总结:只要URL中出现%,日志里都会记载这个错误。在百度或者Google中查询‘%’发现他们都替换成%25

如下:

 var content12=document.getElementById("content").value;
    var phone12=document.getElementById("phone").value;
    content12=content12.replace(//%/g,'%25');//str=str.replace('%','%25');只能替换第一个%
    var url = "phonebookSelectnum.action?content12="+content12+"&phone12="+phone12;


分享给朋友:
您可能感兴趣的文章:
随机阅读: