程序员人生 网站导航

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

栏目:服务器时间:2015-06-09 08:09:09

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

------分隔线----------------------------
------分隔线----------------------------

最新技术推荐