关于resin的illegal utf8 encoding at (190)解决方式
最近在项目开发中,出现了编码异常,内容如下:
- illegal utf8 encoding at (190)
com.caucho.jsp.JspParseException: illegal utf8 encoding at (190)
at com.caucho.jsp.JspCompilerInstance.compile(JspCompilerInstance.java:434)
at com.caucho.jsp.JspManager.compile(JspManager.java:242)
at com.caucho.jsp.JspManager.createPage(JspManager.java:171)
从出错的信息,感觉是编码出现问题。所以查看文件的编码,分为两个部分:
第一个就是jsp的声明部分:<%@ page language="java" pageEncoding="UTF-8"%>
第二个就是在eclipse中查看文件的属性,Text file encoding 为 default(UFT-8)
综上所述,没有发现错误现象。个人感觉:虽然异常字面上理解是编码异常的问题,其实并不一定真的是编码问题,因为我发现一个奇怪的现象:
第一次打开页面的时候会出现这种异常,但是重新刷新页面,反而没有问题。
所以,结合我以前读resin源码的经验来分析,我觉得是内存的字节数据出现了混乱,导致了编码问题。极有可能是我的机子内存不够,导致jsp编译的过程中,没有完全载入jsp文件,导致jsp文件编译过程中出现脏数据,从而出现编码异常问题。带着这样的思路,我去查看resin的配置文件,在resin配置文件中可以调节内存的地方有两处:
一:config文件的:<jvm-arg>-Xmx256m</jvm-arg>,可以调大一点。
二:app-default.xml文件中对jsp页面编译的处理配置如下所示:
<servlet servlet-name="resin-jsp" servlet-class="com.caucho.jsp.JspServlet">
<init>
<load-tld-on-init>false</load-tld-on-init>
<page-cache-max>1024</page-cache-max>
</init>
<load-on-startup/>
</servlet>
通过调节上面jvm的大小或者页面的缓存大小,从而控制内存,最终解决了resin的编码问题。
关于resin的illegal utf8 encoding at (190)解决方式的更多相关文章
- protoc-gen-go: error:bad Go source code was generated: 163:6: illegal UTF-8 encoding (and 2915 more errors)
protoc-gen-go: error:bad Go source code was generated: 163:6: illegal UTF-8 encoding (and 2915 more ...
- 关于GO语言遇到illegal UTF-8 encoding 随手记录
在使用汉字的时候会报错 解决方案 editpad++ 修改编码为UTF-8 保存就可以了~bingo
- CocoaPods requires your terminal to be using UTF-8 encoding
WARNING: CocoaPods requires your terminal to be using UTF-8 encoding. See https://github.com/CocoaPo ...
- java.lang.ClassFormatError: Illegal UTF8 string in constant pool in class file Server/Request
Linux服务器上,将本地编译好的文件上传后,Tomcat启动时报错: Exception in thread "Thread-2" java.lang.ClassFormatEr ...
- 【记录】【solr】whose UTF8 encoding is longer than the max length 32766
java添加数据到solr报错 whose UTF8 encoding is longer than the max length 32766 原因是长度太长,string类型改成text_gener ...
- Node.js Cheerio parser breaks UTF-8 encoding
From: https://stackoverflow.com/questions/31574127/node-js-cheerio-parser-breaks-utf-8-encoding [问题] ...
- Flutter - Finished with error: FormatException: Bad UTF-8 encoding 0xc3 (at offset 169)
方案1: 更改项目的Encoding方式 File -> Settings -> Editor, choose "File Encodings", change Pr ...
- [转]UTF-8 encoding support for the BCP utility and BULK INSERT Transact-SQL command in SQL Server 2014 SP2
本文转自:https://support.microsoft.com/en-us/help/3136780/utf-8-encoding-support-for-the-bcp-utility-and ...
- Flutter FormatException: Bad UTF-8 encoding 0xc3 (at offset 172)
是文件编码问题. 1,打开 Android Studio 进入设置界面 Ctrl + Alt + S 或 File --> Settings 打开如下界面: 2,将 Project Encode ...
随机推荐
- mybatis中查询使用#{}和${}的区别
${}中的变量什么值,就会简单的替代变量,不会做处理 比如delete * from tb_label where name=${labelname} 如果labelname的值是 something ...
- jq怎么给图片绑定上传文件按钮
html代码 <img src="/img/zhengmian.png" alt="" class="file1"> <i ...
- Linux命令列内容
命令列内容: 一般模式 移动光标 [ctrl]+[f] 屏幕[向前]移动一页 [ctrl]+[b] 屏幕[向后]移动一页 0 这是数字0:移动到这一行的最前面字符处 $ 移动到这一行的最后面字符处 G ...
- android 自定义 Application
android系统会为每个程序运行时创建一个Application类的对象且仅创建一个,所以Application可以说是单例 (singleton)模式的一个类.且application对象的生命周 ...
- zabbix3.x自动发现主机
在服务器比较多的情况下,配置加入群组,添加模板是非常费时费力的,所以利用自动发现主机.自动添加群组和模板是非常好的办法. 两步走 1.配置发现规则 2.配置发现动作 1.前提在服务器是上部署了agen ...
- py2和py3的区别总结
1.编码 python2默认编码方式ASCII码(不能识别中文,要在文件头部加上 #-*- encoding:utf-8 -*- 指定编码方式) python3默认编码方式unicode(可识别中 ...
- Luogu3119 草鉴定-Tarjan+Topsort
Solution 简单的$Tarjan$题. 有大佬现成博客 就不写了 → 传送门 Code #include<cstdio> #include<cstring> #inclu ...
- 安卓逆向学习---深入Smali文件
参考:https://www.52pojie.cn/thread-396966-1-1.html Smali中的包信息 .class public Lcom/aaaaa; //他是com.aaaaa这 ...
- IOS https抓包及10.3.3版本证书不生效问题解决
Charles安装 HTTP抓包 HTTPS抓包 1. Charles安装 官网下载安装Charles:https://www.charlesproxy.com/download/ 2. HTTP抓包 ...
- PowerShell工作流学习-2-工作流运行Powershell命令
关键点: a)inlineScript 活动具有活动通用参数,但不具有PowerShell 通用参数,且inlineScript 脚本块中的命令和表达式不具有工作流的功能b)默认inlineScrip ...