2 Replies Latest reply on Oct 18, 2013 12:58 PM by whitingjr

    jsp configuration key name "genStrAsCharArray" is inconsistent.

    whitingjr

      Hi,

      I've identified a problem with the 7.2.0-Final jboss web code included with EAP 6.1.

      The configuration property name to control the JSP compilation to enable char array rather than String is incorrect. It should be using "genStringAsCharArray" to get the value from the settings object. Rather than "genStrAsCharArray".

      FishEye: Annotated - JBossWeb/branches/7.2.x/src/main/java/org/apache/jasper/EmbeddedServletOptions.java

       

      This means the setting is always considered false causing the compiler to always use the String type in the Servlet.

       

      I first noticed this because the generated java source is using String in conjunction with generate-strings-as-char-arrays="true" in the EAP configuration file.  Further investigation with a debugger attached showed the settings object being updated with a key value pair of key "genStringAsCharArray" with "true". Then noticing the object EmbeddedServletOptions is checking the settings object using the wrong key. The default of "false" is always used.

       

      I've checked upstream HEAD branch and his issue is present on line 551.

      http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/EmbeddedServletOptions.java?view=markup

       

      It has been fixed on Tomcat 7.x branch in rev 889966 http://svn.apache.org/viewvc?view=revision&revision=889966

       

      Shall I raise a JIRA on jbossweb and make enquiries to get it back-ported to 6.x branch ?

       

      Regards,

      Jeremy