国内最全IT社区平台 联系我们 | 收藏本站
华晨云阿里云优惠2
您当前位置:首页 > 服务器 > [乐意黎原创] glassfish里抛出Note: string:///XXX_jsp.java from uses unchecked or unsafe

[乐意黎原创] glassfish里抛出Note: string:///XXX_jsp.java from uses unchecked or unsafe

来源:程序员人生   发布时间:2015-06-09 08:09:09 阅读次数:3938次

glassfish里抛出以下毛病:


org.apache.jasper.JasperException: PWC6033: Unable to compile class for JSP

PWC6199: Generated servlet error:
string:///XXXX_jsp.java:169: constant string too long

PWC6199: Generated servlet error:
Note: string:///XXXX_jsp.java from  uses unchecked or unsafe operations.


折腾了好久,始终找不到缘由。
最后,经老大指导,并实际测试。终究发现缘由 
是由于glassfish里 把genStrAsCharArray 项设为 true 致使的。
解决办法:



具体为:
把 $GLASSFISH_HOME/domains/domain1/config/default-web.xml 里的 
<param-name>genStrAsCharArray</param-name>
<param-value>true</param-value> 修改成:
<param-name>genStrAsCharArray</param-name>
<param-value>false</param-value>

genStrAsCharArray

false

If set to true, generates text strings as char arrays, which improves performance in some cases.

The default-web.xml file defines features such as filters and security constraints that apply to all web applications.  The parameter, development=true, (the default value for developer profile) enables changes made to JSPTM

生活不易,码农辛苦
如果您觉得本网站对您的学习有所帮助,可以手机扫描二维码进行捐赠
程序员人生
------分隔线----------------------------
分享到:
------分隔线----------------------------
关闭
程序员人生