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 conditional includes?

843838Oct 25 2005 — edited Aug 2 2007
The jsp include command comes in really handy:
<jsp:include page= " page" />
but is there a way to have conditional includes? Can I put it inside an if statement
<% if (condition){ %>
<jsp:include page= " page1" />
<% } else { %>
<jsp:include page= " page2" />
<%} %>

If not, how can I conditionally include a page?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 30 2007
Added on Oct 25 2005
7 comments
618 views