RE: JSP Compiler produces huge HTML files with whitespace
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:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 12:55 PM To: [EMAIL PROTECTED] 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 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 12:55 PM To: [EMAIL PROTECTED] 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 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSP Compiler produces huge HTML files with whitespace
Hola, I'm not a Jasper expert, my guess is for two reasons: - It's a slight performance hit - 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. Yoav Shapira Millennium Research Informatics -Original Message- From: Brad Neuberg [mailto:[EMAIL PROTECTED] 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:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 12:55 PM To: [EMAIL PROTECTED] 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 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP Compiler produces huge HTML files with whitespace
it is not on by default due to spec issues. for tomcat to be strictly compliant, by default it should not strip the extra carriage returns. If you search the mailing list back to 2001-2002, you see there was lots of discussion about it. the funny thing is, it also makes it easy to tell when a website uses jsp tags. that's an easy way to figure out if a website is using a servlet container and jsp tags. peter On Wed, 08 Sep 2004 10:45:00 -0700, Brad Neuberg [EMAIL PROTECTED] wrote: 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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSP Compiler produces huge HTML files with whitespace
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:[EMAIL PROTECTED] 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:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 12:55 PM To: [EMAIL PROTECTED] 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 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP XML syntax - was -Re: JSP Compiler produces huge HTML files with whitespace
Hi, If you use the XML syntax you can handle whitespaces nicely. There are times when you want/need whitespace to remain, so managing it with the XML syntax is better, imho. Are people using the XML syntax? best, -Rob Shapira, Yoav wrote: Hola, I'm not a Jasper expert, my guess is for two reasons: - It's a slight performance hit - 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. Yoav Shapira Millennium Research Informatics -Original Message- From: Brad Neuberg [mailto:[EMAIL PROTECTED] 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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP Compiler produces huge HTML files with whitespace
At 10:49 AM 9/8/2004, you wrote: it is not on by default due to spec issues. for tomcat to be strictly compliant, by default it should not strip the extra carriage returns. If you search the mailing list back to 2001-2002, you see there was lots of discussion about it. the funny thing is, it also makes it easy to tell when a website uses jsp tags. that's an easy way to figure out if a website is using a servlet container and jsp tags. That seems like a security issue to me. You can fingerprint a remote site and determine what technology they are using, even if they have taken steps to hide the JSP ending from their files. Brad peter On Wed, 08 Sep 2004 10:45:00 -0700, Brad Neuberg [EMAIL PROTECTED] wrote: 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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP Compiler produces huge HTML files with whitespace
well I don't consider that an security issue. just because you know someone is using jsp tags, it doesn't mean you know how the whole architecture works. The only thing it tells a competitor is that it is feasible to use jsp tags. beyond that, all the important and interesting stuff is what makes an impact on how well a site works and performs. but I could be wrong. peter On Wed, 08 Sep 2004 10:55:28 -0700, Brad Neuberg [EMAIL PROTECTED] wrote: At 10:49 AM 9/8/2004, you wrote: it is not on by default due to spec issues. for tomcat to be strictly compliant, by default it should not strip the extra carriage returns. If you search the mailing list back to 2001-2002, you see there was lots of discussion about it. the funny thing is, it also makes it easy to tell when a website uses jsp tags. that's an easy way to figure out if a website is using a servlet container and jsp tags. That seems like a security issue to me. You can fingerprint a remote site and determine what technology they are using, even if they have taken steps to hide the JSP ending from their files. Brad peter On Wed, 08 Sep 2004 10:45:00 -0700, Brad Neuberg [EMAIL PROTECTED] wrote: 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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP Compiler produces huge HTML files with whitespace
Look in the web.xml in the conf directory and use the trimSpaces parameter.. servlet servlet-namejsp/servlet-name servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class init-param param-nametrimSpaces/param-name param-valuetrue/param-value /init-param ... Mark On 8 Sep 2004, at 20:00, Peter Lin wrote: well I don't consider that an security issue. just because you know someone is using jsp tags, it doesn't mean you know how the whole architecture works. The only thing it tells a competitor is that it is feasible to use jsp tags. beyond that, all the important and interesting stuff is what makes an impact on how well a site works and performs. but I could be wrong. peter On Wed, 08 Sep 2004 10:55:28 -0700, Brad Neuberg [EMAIL PROTECTED] wrote: At 10:49 AM 9/8/2004, you wrote: it is not on by default due to spec issues. for tomcat to be strictly compliant, by default it should not strip the extra carriage returns. If you search the mailing list back to 2001-2002, you see there was lots of discussion about it. the funny thing is, it also makes it easy to tell when a website uses jsp tags. that's an easy way to figure out if a website is using a servlet container and jsp tags. That seems like a security issue to me. You can fingerprint a remote site and determine what technology they are using, even if they have taken steps to hide the JSP ending from their files. Brad peter On Wed, 08 Sep 2004 10:45:00 -0700, Brad Neuberg [EMAIL PROTECTED] wrote: 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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]