如何让springboot jetty容器支持jsp Not v
2018-05-04 本文已影响0人
程序员学园
问题描述
- springboot 如何让jetty容器支持jsp
- springboot 访问jsp页面tomcat正常显示,jetty容器显示异常,jsp标签<%basePath%>解析不出来
- springboot使内嵌式jetty服务器支持jsp
- Support JSP with Embedded Jetty
- How can I enable support JSP with embedded Jetty
- Can't make my spring boot application work with jsp
上述问题搜索了一大堆,如下图所示也没找到具体答案,如下,在线助手|在线工具|在线生成|在线制作显示异常
http://www.it399.com/控制台报一堆错误引用错误
2018-05-02 17:58:39.023 WARN 10312 --- [tp1535026957-28] org.eclipse.jetty.util.URIUtil : /%3C%=basePath%20%%3Ejs/utils.js org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 17:58:39.023 WARN 10312 --- [tp1535026957-28] org.eclipse.jetty.util.URIUtil : /%3C%=basePath%20%%3Ejs/utils.js org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 17:58:39.027 WARN 10312 --- [tp1535026957-29] org.eclipse.jetty.util.URIUtil : /%3C%=basePath%%3Ebootstrap/js/bootstrap.min.js org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 17:58:39.026 WARN 10312 --- [tp1535026957-24] org.eclipse.jetty.util.URIUtil : /%3C%=basePath%%3Ejs/jquery.min.js org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 17:58:39.027 WARN 10312 --- [tp1535026957-29] org.eclipse.jetty.util.URIUtil : /%3C%=basePath%%3Ebootstrap/js/bootstrap.min.js org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 17:58:39.027 WARN 10312 --- [tp1535026957-24] org.eclipse.jetty.util.URIUtil : /%3C%=basePath%%3Ejs/jquery.min.js org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 17:58:39.027 WARN 10312 --- [tp1535026957-25] org.eclipse.jetty.util.URIUtil : /%3C%=basePath%%3Ebootstrap/css/bootstrap.min.css org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 17:58:39.028 WARN 10312 --- [tp1535026957-25] org.eclipse.jetty.util.URIUtil : /%3C%=basePath%%3Ebootstrap/css/bootstrap.min.css org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 17:58:39.034 WARN 10312 --- [tp1535026957-23] org.eclipse.jetty.util.URIUtil : /%3C%=basePath%%3Eimgs/home/yuanxiao_logo.png org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 17:58:39.035 WARN 10312 --- [tp1535026957-23] org.eclipse.jetty.util.URIUtil : /%3C%=basePath%%3Eimgs/home/yuanxiao_logo.png org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 17:58:39.036 WARN 10312 --- [tp1535026957-23] org.eclipse.jetty.util.URIUtil : /%3C%=basePath%%3Elogo.jpg org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 17:58:39.036 WARN 10312 --- [tp1535026957-23] org.eclipse.jetty.util.URIUtil : /%3C%=basePath%%3Elogo.jpg org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 17:58:39.036 WARN 10312 --- [tp1535026957-28] org.eclipse.jetty.util.URIUtil : /%3C%=basePath%%3Eimgs/home/home_json.png org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 17:58:39.036 WARN 10312 --- [tp1535026957-28] org.eclipse.jetty.util.URIUtil : /%3C%=basePath%%3Eimgs/home/home_json.png org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 17:58:39.037 WARN 10312 --- [tp1535026957-47] org.eclipse.jetty.util.URIUtil : /%3C%=basePath%%3Eimgs/qrcode/qrcode_logo.jpg org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 17:58:39.037 WARN 10312 --- [tp1535026957-25] org.eclipse.jetty.util.URIUtil : /%3C%=basePath%%3Eimgs/home/house_logo.png org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 17:58:39.037 WARN 10312 --- [tp1535026957-47] org.eclipse.jetty.util.URIUtil : /%3C%=basePath%%3Eimgs/qrcode/qrcode_logo.jpg org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 17:58:39.037 WARN 10312 --- [tp1535026957-25] org.eclipse.jetty.util.URIUtil : /%3C%=basePath%%3Eimgs/home/house_logo.png org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 17:58:39.046 WARN 10312 --- [tp1535026957-28] org.eclipse.jetty.util.URIUtil : /%3C%=basePath%%3Ebootstrap/js/bootstrap.min.js org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 17:58:39.046 WARN 10312 --- [tp1535026957-28] org.eclipse.jetty.util.URIUtil : /%3C%=basePath%%3Ebootstrap/js/bootstrap.min.js org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 18:02:12.751 WARN 10312 --- [tp1535026957-47] org.eclipse.jetty.util.URIUtil : /%3C%=basePath% org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 18:02:12.751 WARN 10312 --- [tp1535026957-47] org.eclipse.jetty.util.URIUtil : /%3C%=basePath% org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 18:02:13.435 WARN 10312 --- [tp1535026957-29] org.eclipse.jetty.util.URIUtil : /%3C%=basePath% org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
2018-05-02 18:02:13.436 WARN 10312 --- [tp1535026957-29] org.eclipse.jetty.util.URIUtil : /%3C%=basePath% org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! char appended in state 24
最终原因:依赖包少了!!!!
原先只加入了
<!--指定容器starter-jetty-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
还要加入如下依赖
<!--jetty容器支持jsp start-->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>9.4.10.RC1</version>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<version>7.0.0.pre5</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>9.4.10.RC1</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
<version>9.4.10.RC1</version>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-2.1</artifactId>
<version>7.0.0pre2</version>
</dependency>
<!--jetty容器支持jsp end-->
至此问题解决,可以访问在线助手|在线工具|在线生成|在线制作 http://www.it399.com看下效果!
本文同步发布在 在线助手|在线工具|在线生成|在线制作 ,转载请注明来自 在线助手|在线工具|在线生成|在线制作 博客频道【如何让springboot jetty容器支持jsp Not valid UTF8! char appended in state 24】,原文链接:http://www.it399.com/blog/web/201805041818