As Craig just told you in the previous mail , you habe to use :
<jsp:include page="<%= pathname %>" flush="true"/>
where pathname is the path and/or name of a file that could be depending on few
parameters at runtime
if(blabla)
pathname= toto.jsp
else
pathname= titi.jsp
regards
veronique
Arnab Acharya a �crit :
> Dear Group,
>
> I'm afraid I'm not fully into this but, in our project we've done something
> similar. We used :
>
> <jsp:include page="top.jsp" flush="true" >
>
> Here, we were able to take up the changed file. However, as far as dynamism
> was concerned, the file was fixed i.e., top.jsp and not any other file. Now,
> do u have anyway to choose a file at runtime?
>
> TIA,
>
> Arnab
>
> > -----Original Message-----
> > From: Craig R. McClanahan [SMTP:[EMAIL PROTECTED]]
> > Sent: Thursday, April 20, 2000 2:28 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: How to dynamicaly include files in jsp, not using<%@
> > include file="filename"%>?
> >
> > "Manty, George" wrote:
> >
> > > It appears to me as though there is no way to do this. I think this
> > > functionality should be added to the JSP Spec.
> > >
> >
> > It is, sorta ... see below.
> >
> > >
> > > Right now, the only way it appears you can implement this is by hacking
> > the
> > > JSP engine code and you can only do this if you are using an open source
> > JSP
> > > engine.
> > >
> > > Anyone, have any other possible solutions?
> > >
> >
> > The <%@ include file="..."%> directive is processed at the time your JSP
> > page is
> > compiled, not when it is executed. Therefore, there is no opportunity for
> > you to
> > calculate the name of the file to be included, because your scriptlet (or
> > whatever)
> > isn't used until a request is made.
> >
> > On the other hand, you can use <jsp:include> instead, for example:
> >
> > <%
> > String pathname = "/page" + request.getParameter("page_number");
> > %>
> > <jsp:include page="<%= pathname %>" flush="true"/>
> >
> > This works because <jsp:include> is processed at request time.
> >
> > >
> > > Thanks,
> > > George
> > >
> >
> > Craig McClanahan
> >
> > ==========================================================================
> > =
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets