Sure it is...just do this...
<%
String sPage = "index.jsp";
if (myCondition()) {
sPage = "anotherPage.jsp";
}
else if (anotherCondition()) {
sPage = "yetAnother.jsp";
}
%>
<jsp:include page="<%= sPage %>" flush="true" />
Hope that helps.
- Joel Kozlow
-----Original Message-----
From: Kyle Burke [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 23, 2001 10:40 AM
To: Tomcat-Users
Subject: Include question...
Is this possible (see <CODE>)? I have a file that depends on the query
string for display. Can I have include files based on that query string
too?
If action=edit show the data in form fields otherwise show it in formatted
text.
When the files are included vs. when the page is compiled and executed (see
<EXCEPTION>). Thanks peops!
<EXCEPTION>
Unable to compile class
'try' without 'catch' or 'finally'
but I dont have any exception handling in the page.
</EXCEPTION>
<CODE>
<%
if(action.equals("edit")){
%>
<%@ include file="includes/edit_staff.jsp"%>
<%
}else{
%>
<%@ include file="includes/view_staff.jsp"%>
<%
}
%>
</CODE>
Kyle Burke