Results 1 to 2 of 2
Thread: Need help in JSTL <c:set>
- 05-24-2010, 01:01 PM #1
Member
- Join Date
- May 2010
- Location
- Chennai
- Posts
- 1
- Rep Power
- 0
Need help in JSTL <c:set>
Dear All,
I have one requirement, where i need to set variable name dynamically while looping.
i need to set variable name as level1,level2,level3,level4 and assign values while looping.So that i used,
<c:set var="level${status.count}" value="${currentLevel}" /> but it is not working.
My full code is ,
Please help me.:(Java Code:<c:forEach items="${levels}" var="currentLevel" varStatus="status" begin="0" end="5"> level<c:out value="${status.count}" /> is <c:out value="${currentLevel}" /> <br /> <c:set var="level${status.count}" value="${currentLevel}" /> <c:out value="level${status.count}"/> </c:forEach>Last edited by raghavanjm; 05-24-2010 at 03:25 PM. Reason: code part not proper
- 05-24-2010, 02:35 PM #2
Member
- Join Date
- Mar 2010
- Posts
- 26
- Rep Power
- 0
Similar Threads
-
Jstl
By prakashkadakol in forum New To JavaReplies: 10Last Post: 01-13-2010, 07:17 PM -
JSTL && NullPointerException
By berlindutza in forum JavaServer Pages (JSP) and JSTLReplies: 7Last Post: 01-12-2010, 05:43 PM -
Why are we using JSTL in jsp?
By makpandian in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 06-30-2009, 10:15 PM -
jstl tag <if>
By subha in forum Advanced JavaReplies: 1Last Post: 04-02-2009, 09:07 PM -
jstl in jsp
By nagaprasanna in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 11-18-2008, 08:18 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks