Simple jsp navigation bar

Discussion in 'Java' started by andychambers2002@yahoo.co.uk, Jan 26, 2006.

  1. Guest

    Hi

    I want to create the jsp equivalent of the following bash snippet...

    CURRENT=b
    for i in a b c d
    do
    if [[ $i == $CURRENT ]] then
    echo "<li><a href='/path/to/i' class='current'>$i></a>"
    else
    echo "<li><a href='/path/to/i'>$i></a>"
    done

    Is there a simple way of doing this?

    Regards,
    Andy
     
    , Jan 26, 2006
    #1
    1. Advertising

  2. On 2006-01-26, <> wrote:
    > Hi
    >
    > I want to create the jsp equivalent of the following bash snippet...
    >
    > CURRENT=b
    > for i in a b c d
    > do
    > if [[ $i == $CURRENT ]] then
    > echo "<li><a href='/path/to/i' class='current'>$i></a>"
    > else
    > echo "<li><a href='/path/to/i'>$i></a>"
    > done
    >
    > Is there a simple way of doing this?


    All depends on how you define "simple".

    Getting a JSP (or java) tutorial that explains how to use a loop, array
    of char, evalutation with if/else and applying that content seems the easiest
    solution to me.

    --
    Met vriendelijke groeten,
    Tim Van Wassenhove <http://timvw.madoka.be>
     
    Tim Van Wassenhove, Jan 26, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    0
    Views:
    3,599
  2. John Hann
    Replies:
    0
    Views:
    6,165
    John Hann
    Aug 21, 2004
  3. Matt
    Replies:
    9
    Views:
    71,237
  4. Eswa
    Replies:
    0
    Views:
    397
  5. Matt
    Replies:
    9
    Views:
    631
    kaeli
    Aug 23, 2004
Loading...

Share This Page