Karl,
You *can* use the <jsp:include page="..." /> to include other .jsp content
into your current .jsp page. I tried it with both JRun 2.3 155 and with
Sun's own JSWDK-1.0.1 (which is a reference implementation of the JSP1.0
page spec). This is useful also if you want to include dynamic pages at run
time (for instance, setting a variable to a page name and then using that
page name in the include page). We too were confused with what the spec had
to say on this issue, but it does appear that the intended functionality is
that of actually having the included content parsed into the original page.
Erik
Sahl
[EMAIL PROTECTED]
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Karl
> Roberts
> Sent: Wednesday, November 03, 1999 6:37 AM
> To: [EMAIL PROTECTED]
> Subject: Re: How do I conditionally include a file/page
>
>
> Hi,
> yes it is possible, this will include the result of another.jsp into
> your page:
>
> <%
> if(true) {
> %>
> <%@ include file="another.jsp" %>
> <%
> }
> %>
>
> however if you want to use the "include page"
> try using <jsp:include page="relativeURL" />
> but beware that it will be unparsed ie it will just put all the contents
> of the file pointed to by the relativeURL into your page which is fine
> if the relativeURL is html or text but can cause errors if it is another
> JSP.
>
> Karl
> PS For more info there is a [EMAIL PROTECTED] list
>
>
> Rupesh Choubey wrote:
>
> >
> >
> >
> > Is it possible to conditionally include another jsp within a
> > scriptlet...for example..
> >
> > <% if (true) { %>
> > <%@ include page=..............%>
> > } %>
> >
> > it does not work for me....if there is a solution, does it work for
> > both page include and file includes???
> >
> >
> > Please let me know if possible....Thanks.
> >
> > Rupesh
>
> __________________________________________________________________
> _________
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html