[opencms-dev] Trim whitespaces from template
Tobias Mantsch
t.mantsch at easysport.de
Thu Apr 7 13:44:12 CEST 2011
Hi Robert,
you can format your scriptlet code a little bit differently to avoid the
blank lines:
<%@ page trimDirectiveWhitespaces="true"
%><%@ page trimDirectiveWhitespaces="true"
%>
The JSP-Processor removes everything between the <% and %>, so if you
want to get rid of the blank lines, you should include the linebreaks in
these scriptlet passages.
This is not a very nice solution but we also needed something similar,
when we needed some line separated data to be sent by a template and
blank lines would have killed the data processor.
Regards
Tobias
Von: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] Im Auftrag von Robert Weber
Gesendet: Donnerstag, 7. April 2011 12:49
An: opencms-dev at opencms.org
Betreff: [opencms-dev] Trim whitespaces from template
Hi there,
I would like to know if there is a possibility to remove the blank lines
left behind by JSP directives within a template.
I use Tomcat 5.5 and JSP 2.0 and therefore can not use
<%@ page trimDirectiveWhitespaces="true" %>
within my template.
I tried to use the init-parameter within my tomcat web.xml
<init-param>
<param-name>trimSpaces</param-name>
<param-value>true</param-value>
</init-param>
But I does not work because the file extension of my generated file is
*.html I guess.
Any help is really appreciated!
Cheers!
Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20110407/16e5a9a1/attachment.htm>
More information about the opencms-dev
mailing list