+ Reply to Thread
Results 1 to 2 of 2

Thread: JSTL : How to set a variable

  1. Join Date
    Apr 2007
    Location
    KL
    Posts
    20
    Rep Power
    0

    JSTL : How to set a variable

    Dear All,

    Currently what i need to do now is to set the parameter using <c:set> in the loop <c:foreach>

    <c:forEach var="num" items="${fn:split(stl:decode(param, ';')}">
    <c:set var="splitCnt" value="${i}"></c:set>
    <c:set var="ValOpt${splitCnt}" value="${num}"></c:set>
    <c:set var="i" value="${i+1}"></c:set>
    </c:forEach>


    Content of param is "testing;123"
    how i want to set ValOpt1 to have value "testing"
    and set ValOpt2 to have value "123"
    P/s: red font is not supported. How can i solve this?

    Any opinion or solution is most appreciate.
    Thanks in advanced.

  2. Join Date
    Apr 2007
    Location
    KL
    Posts
    20
    Rep Power
    0
    nevermind, i find the solution already..
    even this is not a gud one, but it helps to solve my current problem.

    Any other solutions/ideas still appreciated.

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Can I get a variable name as a string?
    By montyauto in forum Website Programming
    Replies: 3
    Last Post: 06-05-2007, 04:51 AM
  2. how to set session variable for php using dreamweaver
    By vash in forum Website Programming
    Replies: 5
    Last Post: 27-04-2005, 10:17 PM
  3. load variable dari database ke dalam flash
    By cryno in forum Website Design
    Replies: 2
    Last Post: 17-09-2002, 10:36 AM
  4. Variable in ASP
    By kala_krayon in forum Website Programming
    Replies: 4
    Last Post: 10-08-2002, 12:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35