You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kiran Patel <ki...@simas.com> on 2005/07/22 00:27:53 UTC
Jsp and xml
Hello all,
I am creating a xml document using JSP. The JAVA codes in JSP creates blank lines in xml document. How can I remove this or how can I don't create. I will appreciate any help.
Thank You,
Kiran Patel
Software Engineer
Solutions Inc.
Re: Jsp and xml
Posted by Tim Koop <gr...@timkoop.com>.
Two things I can think of:
1. Remember that a line that contains <% ...code... %> will also
produce an end-of-line (eol) character, so instead of something like this:
<% for (int i=0; i<list.length; i++) { %>
<tag name="<%= list[i] %>">
<% } %>
do something like this:
<% for (int i=0; i<list.length; i++) { %><tag name="<%= list[i] %>">
<% } %>
or this:
<% for (int i=0; i<list.length; i++) {
%><tag name="<%= list[i] %>">
<% } %>
2. Maybe you are producing the xml/jsp on a Windows computer that
produces CR + LF characters and viewing it on a computer that interprets
these as two separate EOL characters. This is not as likely as number 1
above.
Tim Koop
Kiran Patel wrote:
>Hello all,
>
>I am creating a xml document using JSP. The JAVA codes in JSP creates blank lines in xml document. How can I remove this or how can I don't create. I will appreciate any help.
>
>Thank You,
>
>Kiran Patel
>Software Engineer
>Solutions Inc.
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org