<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta name="generator" content="SuSE Linux Openexchange Server 4">
<title></title>
</head>
<body>
In case of Tomcat you could also look into the following parameter (web.xml):<br><br> <init-param><br> <param-name>trimSpaces</param-name><br> <param-value>true</param-value><br> </init-param><br><br><br>/Sami<br><br>On May 24, 2007 04:11 PM, Isaac R. Higgins <isaac.higgins@isaacray.com> wrote:<br><br>> <br>> basically the idea is to not have any new-lines between any of the JSP scriptlet elements on the page. This may need to be done in the template. Here is a full sample that was important because it is XML:<br>> <br>> <br>> <%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %><%@ <br>> taglib prefix="c" uri="http://java.sun.com/jstl/core" %><%@ <br>> page import="com.opencms.flex.jsp.*,com.opencms.file.*,java.util.*" %><br>> <jsp:usebean id="cmsbean" class="org.opencms.jsp.CmsJspBean"><br>> <% cmsbean.init(pageContext, request, response); %><br>> </jsp:usebean><%<br>> <br>> java.util.List alist = (new org.opencms.jsp.CmsJspNavBuilder()).getSiteNavigation(cmsbean.getCmsObject(), "/" ,-1);<br>> //java.util.List alist = (new org.opencms.jsp.CmsJspNavBuilder()).getSiteNavigation();<br>> <br>> %><br>> <urlset xmlns="http://www.google.com/schemas/sitemap/0.84"><%<br>> for (int i=0;i<alist.size();++i){><br>> org.opencms.file.CmsResource ress = null;<br>> java.util.Date date1 = new java.util.Date();<br>> try{<br>> ress = org.opencms.main.OpenCms.initResource(cmsbean.getCmsObject(),<br>> (((org.opencms.jsp.CmsJspNavElement)alist.get(i)).getResourceName()),<br>> request,<br>> response);<br>> date1 = new java.util.Date(ress.getDateLastModified());<br>> }catch(Exception e){}<br>> <br>> int year = date1.getYear()+1900;<br>> int day = date1.getDate();<br>> int month = date1.getMonth()+1;<br>> %><br>> <url><br>> <loc><%= ((org.opencms.jsp.CmsJspNavElement) alist.get(i)).getResourceName() %></loc><br>> <lastmod><%= year %>-<%= month %>-<%= day %></lastmod><br>> <changefreq>daily</changefreq><br>> <priority>0.5</priority><br>> </url><%}%><br>> </alist.size();++i){> <br>> <br>> <br>> <br>> -----Original Message-----<br>> From: opencms-dev-bounces@opencms.org on behalf of Francis<br>> Sent: Thu 5/24/2007 9:48 AM<br>> To: The OpenCms mailing list<br>> Subject: Re: [opencms-dev] page ugliness<br>> <br>> I don't understand how to place your block.<br>> <br>> In my pages it seems that the use of jstl create many blank lines.<br>> <br>> Francis<br>> <br>> Isaac R. Higgins a écrit :<br>> > I have the same pet peeve.<br>> ><br>> > I usually do it like this:<br>> ><br>> > <% /*this is jsp block #1*/ %><%<br>> > /*this is jsp block #2*/ %><%<br>> > /*this is jsp block n*/ %><br>> ><br>> ><br>> > By removing the newline/whitespace between JSP blocks, it's not translated to the page as anything outside the jsp code tags will be parsed as plain HTML.<br>> ><br>> > -----Original Message-----<br>> > From: opencms-dev-bounces@opencms.org on behalf of Christoph P. Kukulies<br>> > Sent: Thu 5/24/2007 8:58 AM<br>> > To: opencms-dev@opencms.org<br>> > Subject: [opencms-dev] page ugliness<br>> > <br>> > I always wondered where all the blank lines come from in my generated<br>> > page output.<br>> ><br>> > It seems that for every newline in a jsp section, be it <% %> embedded<br>> > code or <&tags %> that newline is transported into the output page.<br>> ><br>> > This is ugly, I think, and I'm seeking for a way to avoid that. Removing<br>> > newlines in code section makes it hardly legible on the other hand.<br>> ><br>> > I'm hoping there is a switch (in jsp) to suppress new lines as long as<br>> > they belong to jsp sections.<br>> ><br>> > Comments?<br>> ><br>> > --<br>> > Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de<br>> ><br>> ><br>> > _______________________________________________<br>> > This mail is sent to you from the opencms-dev mailing list<br>> > To change your list options, or to unsubscribe from the list, please visit<br>> > http://lists.opencms.org/mailman/listinfo/opencms-dev<br>> ><br>> ><br>> ><br>> > <br>> > ------------------------------------------------------------------------<br>> ><br>> ><br>> > _______________________________________________<br>> > This mail is sent to you from the opencms-dev mailing list<br>> > To change your list options, or to unsubscribe from the list, please visit<br>> > http://lists.opencms.org/mailman/listinfo/opencms-dev<br>> <br>> <br>> <br>> <br></urlset></isaac.higgins@isaacray.com>
</body>
</html>