Forums Register Login

a difficult problem in JSTL

+Pie Number of slices to send: Send
I save many lines (using "\n") in 1 field in Access.

Now i want get them and output in textfields through line:

// Output all in a time
<c:set var="nr" value="0"/>
<c:forTokens var="adr" items="${OrderForm['address']}" delims="\n">
<input type="text" name="address[<c:out value="${nr}"/>]" value="<c:out value="${adr}"/>">
<c:set var="nr" value="${nr+1}"/>
</c:forTokens>

// Output every 1 line
<td><input type="text" style="width:400" name="customerName" value="<c:out value="${adr[0]}"/>"></td>
<td><input type="text" style="width:400" name="customerName" value="<c:out value="${adr[1]}"/>"></td>

Errors: they don't understand \n & adr[0].

Thank you for your response.

I think it's in SCWCD, so i put it here.
Aaaaaand ... we're on the march. Stylin. Get with it tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 643 times.
Similar Threads
Implementation of google charts in JSP
found String rquired int
javascript error: object expected
a difficult problem in JSTL
Using JSTL Data Displayed In Browser Is Getting Fixed To 24576 Bytes(24 KB)
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 02:34:18.