• 警告: 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;

  • 相关阅读:
    在ts+vue中实现前端批量下载打包二维码
    常用到的MD5加密
    Permission denied Command PhaseScriptExecution failed with a nonzero exit code
    iOS App 内购 Demo
    App 上架遇到的坑
    基于StreamingKit的音频播放器
    iOS 添加多图片加签名
    xcode10 自定义代码块
    xcode10 之后代码不联想
    Mac 开发PHP 使用ThinkPHP
  • 原文地址:https://www.cnblogs.com/danica/p/2116062.html
Copyright © 2020-2023  润新知