[prev in list] [next in list] [prev in thread] [next in thread] 

List:       taglibs-user
Subject:    Re: jstl and splitting carriage returns
From:       Digby <lists () digby ! net>
Date:       2005-05-26 12:57:27
Message-ID: d74h06$d5$1 () sea ! gmane ! org
[Download RAW message or body]

Cool. Will give it a try. Thx.

Ohring, Peter wrote:
> I had the same problem last week. For whatever reason (The JSP policy on
> whitespace) I couldn't set a variable to "\n" but I could create one
> using the following hack:
> 
> <c:set var="temp" value="one
> two"/>
> <c:set var="newline" value="${fn:substring(temp,4,5)}"/>
> 
> (Note that on my windows computer temp="one\r\ntwo" so that the 5th
> character is the newline character)
> 
> Then you should be able to split the string using this new variable,
> e.g.
> 
> <c:forEach items='${fn:split(feed, newline)}' var="row">
>     <c:out value="${row}"/>
> </c:forEach>
> 
> Peter
> 
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Digby
> Sent: Thursday, May 26, 2005 5:24 AM
> To: taglibs-user@jakarta.apache.org
> Subject: jstl and splitting carriage returns
> 
> Hi again,
> 
> Anyone know if it's possible to do an fn:split on carriage returns (\n).
> 
> I just get invalid expression error messages with:
> 
>          <c:forEach items='${fn:split(feed, "\n")}' var="row">
>              <c:out value="${row}"/>
>          </c:forEach>
> 
> TIA
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic