Unexpected line breaks appended to end of values in string array by jsp:fn:split

huma4hu

New Member
Basically am using \[code\]jsp:fn:split\[/code\] to construct an array as a parameter passed to bean.The strings are parsed from the warning/cauation elements of the following XML:\[code\]<?xml version="1.0" encoding="UTF-8"?><task><caution>fs43sd</caution><title>aaaa<warning>fsdfas</warning></title><warning>asddas</warning><sbsb><warning>fsdasds</warning></sbsb><aaaaa><bbb><caution>fsdfsd243sd</caution><warning>fsdfsd</warning></bbb></aaaaa></task>\[/code\]And the string array is constructed and parameterized to bean using the following JSP:\[code\]<c:set var="wids"><x:forEach select="$output/descendant::warning" var="warning"><x:out select="$warning" />,</x:forEach></c:set><c:set var="cids"><x:forEach select="$output/descendant::caution" var="caution"><x:out select="$caution" />,</x:forEach></c:set><jsp:useBean id="wc" class="main.beans.WCBean"><jsp:setProperty name="wc" property="wids" value="http://stackoverflow.com/questions/14545869/${fn:split(wids,',')}"/><jsp:setProperty name="wc" property="cids" value="http://stackoverflow.com/questions/14545869/${fn:split(cids,',')}"/></jsp:useBean>\[/code\]And when I print the constructed array using \[code\]<c:forEach items="${fn:split(wids, ',')}" var="entry">${entry},</c:forEach>\[/code\]:\[code\]fsdfas,asddas,fsdasds,fsdfsd,\[/code\]Note that line breaks are appended to the end of each value. Any thought?
 
Back
Top