Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSP if statement syntax

843840Dec 11 2008 — edited Dec 11 2008
Basically I'm trying to populate a list in a JSP page. At the minute I have something like this:

<li>List
<ul>
<li><a first</a>
<li><a second</a>
<li><a third</a>
</ul>
</li>

What I want to know is can i do something like this? Basically I want to tailor my list to show certain elements depending on "something".

<li>List
<ul>
if (something == true){
<li><a first</a>
<li><a second</a>
}
<li><a third</a>
</ul>
</li>

Really new to JSP stuff so any help would be great!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 8 2009
Added on Dec 11 2008
3 comments
661 views