tomcat启动项目异常: 2 字节的 UTF-8 序列的字节 2 无效。

来源:互联网 发布:免费域名小说1080 编辑:程序博客网 时间:2024/06/06 23:13

严重: Servlet.service() for servlet [jsp] in context with path [/test] threw exception [org.apache.jasper.JasperException: XML parsing error on file org.apache.tomcat.util.scan.MergedWebXml] with root causecom.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 2 字节的 UTF-8 序列的字节 2 无效。


解决方法:

 

在tomcat的bin目录下有文件catalina.bat

找到这行:set JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%

在它上一行加入:set JAVA_OPTS=-server -Dfile.encoding=utf-8


0 1