You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Pavel Cibulka <pa...@gmail.com> on 2013/10/09 12:11:47 UTC

jasper changes for 8.0: genStringAsCharArray, genStringAsByteArray, trimSpaces

Hello, both jetty and glassfish have genStringAsByteArray set to "true" by
default. Would it be possible to change this in jasper? I know
that genStringAsByteArray is not implemented yet, what about
making genStringAsCharArray default "true" for now?

Also trimSpaces works as in specification, but it is really useful only in
Jspx. It wouldn't do much in jsp. It would be nice, if jasper provide some
option to remove spaces from jsp too. Either by some settings or option to
execute external plugin similar to tagPlugins.

We are using com.google.code.maven-replacer-plugin maven plugin for
removing white spaces in production build now. It would be much better for
testing, bug tracking, development, if jasper do this.

I could contribute some code on weekends, if needed.
Pavel

Re: jasper changes for 8.0: genStringAsCharArray

Posted by Jeremy Boynes <jb...@apache.org>.
On Oct 9, 2013, at 3:11 AM, Pavel Cibulka <pa...@gmail.com> wrote:

> Hello, both jetty and glassfish have genStringAsByteArray set to "true" by
> default. Would it be possible to change this in jasper? I know
> that genStringAsByteArray is not implemented yet, what about
> making genStringAsCharArray default "true" for now?

Is this actually more efficient still? AIUI, both forms turn into a call to System.arrayCopy from the source array to the buffer and the setup code (checking bounds etc.) is something I would expect a JIT to elide for both forms.

Cheers
Jeremy