Simple jsp navigation bar

A

andychambers2002

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
 
T

Tim Van Wassenhove

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top