Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2006

Tip: Looking for answers? Try searching our database.

Simple jsp navigation bar

Thread view: 
andychambers2002@yahoo.co.uk - 26 Jan 2006 16:42 GMT
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
Tim Van Wassenhove - 26 Jan 2006 19:35 GMT
> Hi
>
[quoted text clipped - 10 lines]
>
> 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.

Signature

Met vriendelijke groeten,
Tim Van Wassenhove <http://timvw.madoka.be>



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.