I may be referring to an oldschool version of tomcat but the include
directive occurs during compilation, not execution.  So to do what you want
you'd have to say
<%      if(goo){        %>
<%@ include file="filenameA" %>
<%      }else{  %>
<%@ include file="filenameB" %>
<%      }       %>

or

do your thing the other way around and redirect to different pages with
<SOME DEFAULT PAGE STUFF HERE> incuded instead.

-rick

-----Original Message-----
From: Luc Foisy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 1:54 PM
To: Tomcat User List (E-mail)
Subject: JSP Question



I am trying to use <%@ include file="filename" %>

I am sending to the page that has this with the line:
response.sendRedirect("main.jsp?p="+applicationJar.getPageName());

So in main.jsp I would like to include an external file to insert into a
default page, something like:

<SOME DEFAULT PAGE STUFF HERE>
<%@ include file="filename" %>
<SOME DEFAULT PAGE STUFF HERE>

but I would like to replace "filename" with request.getParameter("p")

Any one have any idea how to do this?

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

<<application/ms-tnef>>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to