web.xml配置乱码过滤器之后报错

渣的不能再渣的渣 发布于 2017/03/02 13:07
阅读 927
收藏 0

严重: Servlet.service() for servlet [back] in context with path [] threw exception
java.io.UnsupportedEncodingException: The character encoding [uft-8] is not supported
    at org.apache.tomcat.util.buf.B2CConverter.getCharsetLower(B2CConverter.java:91)
    at org.apache.tomcat.util.buf.B2CConverter.getCharset(B2CConverter.java:78)
    at org.apache.catalina.connector.Request.setCharacterEncoding(Request.java:1637)
    at org.apache.catalina.connector.RequestFacade.setCharacterEncoding(RequestFacade.java:330)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:83)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

加载中
0
渣的不能再渣的渣

里面是这样配置的

<!-- 配置拦截的url -->
    <servlet-mapping>
        <servlet-name>back</servlet-name>
        <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <!-- 配置提交乱码过滤器 -->
    <filter>
        <filter-name>characterEncodingFilter</filter-name>
        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>UFT-8</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>characterEncodingFilter</filter-name>
        <url-pattern>*.do</url-pattern>
    </filter-mapping>

0
码路上的单身狗
码路上的单身狗

大兄弟  utf-8  不是UFT-8

渣的不能再渣的渣
谢谢了老哥。。。。我有点瞎
0
渣的不能再渣的渣

引用来自“绺木恋晓”的评论

大兄弟  utf-8  不是UFT-8

谢谢了

红魔小贝
红魔小贝
渣的不能再渣 多看日志渣渣
0
battyman
battyman
出错从来不看日志。。。
返回顶部
顶部