tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brad Neuberg <b...@columbia.edu>
Subject RE: JSP Compiler produces huge HTML files with whitespace
Date Wed, 08 Sep 2004 17:54:44 GMT
At 10:47 AM 9/8/2004, you wrote:

>Hola,
>I'm not a Jasper expert, my guess is for two reasons:
>- It's a slight performance hit

True, but this at compile time when the JSP is compiled; thats a one time 
yet that is already slow due to the JSP being compiled.  You should see how 
ugly these HTML files are without trimSpaces on.


>- There's a slight change of bugs or sub-optimal behavior.  For example
>a subtle one was pointed out the other day: with trimSpaces on,
>${something} followed by a space becomes just ${something} without a
>space after it.  But for some HTML tags, e.g. <img>, and some browsers,
>this causes different display behavior.

It seems better to turn it on and then isolate these bugs.  Our Tomcat shop 
ran for months without knowing about the trimSpaces parameter.  It seems 
like a hack to turn off trimSpaces by default rather than fix any bugs that 
might happen because it is on.

Brad


>Yoav Shapira
>Millennium Research Informatics
>
>
> >-----Original Message-----
> >From: Brad Neuberg [mailto:bkn3@columbia.edu]
> >Sent: Wednesday, September 08, 2004 1:45 PM
> >To: Tomcat Users List
> >Subject: RE: JSP Compiler produces huge HTML files with whitespace
> >
> >Yoav, thanks; this works.  One question; why isn't this true by
>default?
> >
> >Brad
> >
> >At 09:56 AM 9/8/2004, you wrote:
> >
> >>Hi,
> >>trimSpaces at
> >>http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html.
> >>
> >>Yoav Shapira
> >>Millennium Research Informatics
> >>
> >>
> >> >-----Original Message-----
> >> >From: Brad Neuberg [mailto:bkn3@columbia.edu]
> >> >Sent: Wednesday, September 08, 2004 12:55 PM
> >> >To: tomcat-user@jakarta.apache.org
> >> >Subject: JSP Compiler produces huge HTML files with whitespace
> >> >
> >> >It seems like Tomcats JSP compiler produces _huge_ HTML pages,
> >>retaining
> >> >all the white space in the original JSP file.  When I view source I
>see
> >>a
> >> >tremendous amount of white space with barely any tags.  The file
>sizes
> >>are
> >> >bloated by about three times.  I have GZIP encoding on, but the
>white
> >>space
> >> >makes it difficult for developers to step over the HTML produced to
> >>debug
> >> >things.  Does anyone know if there is a setting in Tomcat to reduce
>the
> >> >amount of whitespace in generated HTML files from JSP?
> >> >
> >> >Thanks,
> >> >   Brad Neuberg
> >> >   Senior Software Engineer, Rojo Networks
> >> >   bkn3@columbia.edu
> >> >
> >> >
> >>
> >---------------------------------------------------------------------
> >> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >>
> >>
> >>
> >>
> >>This e-mail, including any attachments, is a confidential business
> >>communication, and may contain information that is confidential,
> >>proprietary and/or privileged.  This e-mail is intended only for the
> >>individual(s) to whom it is addressed, and may not be saved, copied,
> >>printed, disclosed or used by anyone else.  If you are not the(an)
> >>intended recipient, please immediately delete this e-mail from your
> >>computer system and notify the sender.  Thank you.
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>
>This e-mail, including any attachments, is a confidential business 
>communication, and may contain information that is confidential, 
>proprietary and/or privileged.  This e-mail is intended only for the 
>individual(s) to whom it is addressed, and may not be saved, copied, 
>printed, disclosed or used by anyone else.  If you are not the(an) 
>intended recipient, please immediately delete this e-mail from your 
>computer system and notify the sender.  Thank you.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message