If you actually want to "include code":
<% if (x == true) { %>
    <!--#INCLUDE VIRTUAL="/path/x.jsp"-->
<% } else if ( y == true) { %>
    <!--#INCLUDE VIRTUAL="/path/y.jsp"-->
<% } else { %>
    <!--#INCLUDE VIRTUAL="/path/other.jsp"-->
<% } %>

for 0.92 JSP.
For 1.0 JSP use <%@ include file="/path/x.jsp" %>

If what you want is to include the *output* of other code, change the
above
<!--#INCLUDE ... -->'s to
<%
this.getSerlvetContext().getRequestDispatcher("/path/x.jsp").include(reque
st, response); %> for 0.92 JSP (<%@ vinclude="/path/x.jsp" %> might work
too).
For 1.0 JSP use <jsp:include page="/path/x.jsp" />

Lance Lavandowska
Software Engineer
http://www.AgDomain.Com

-----Original Message-----
From: Oliver Pereira <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, October 07, 1999 12:54 AM
Subject: Conditional includes


>Hi
>
>I am using jsp .92 spec on NAS 4.0.
>
>How do i conditionally include some code ?
>
>for eg. if my browser is IE
>then
>  code..
>...
>
>Else If if my browser is Netscape
>
>some Code...
>...
>
>Thanks in advance
>
>Oliver
>
>=========================================================================
==
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
>FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to