> Hi,
>   I want some help regarding the <%@include file="blah.jsp"%> directive.
> instead of writting the filename statically i have to write it
> dynamically.
>     say : the filename will be stored in some jsp variable 'x'
> then i would
> like to do something like <%@include file='jsp variable x'%>
>     can anyone help me out doing this.is it possible.

Remember that include directive is evaluated at JSP translation phase i.e
when
JSP is converted to a servlet. Thus include directive's file attribute can
only
have a static file name. You can use variable in include action though as it
would
be evaluated at request time.

for e.g.

<%! String includePage="include.jsp" ; %>
<jsp:include page = "<%= includePage%>" >
</jsp:include>

Hope it helps...

-Shiraz

===========================================================================
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

Reply via email to