Actually , I dont know the specification, But I am doing it Dynamically in
the following way :
if(errors>0)
{
//include the file
}

Ashwani
> ----------
> From:         Veena
> Sent:         Wednesday, February 16, 2000 12:48 PM
> To:   [EMAIL PROTECTED]
> Subject:      Re: problems with jsp:include to include files dynamically
>
> For including files dynamically i can't use <%@ include  %> ...That's what
> the slpecification says.........................
>
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, March 06, 2000 12:24 PM
> Subject: RE: problems with jsp:include to include files dynamically
>
>
> > Why not try html tag <%@ include  %>  instead of jsp tag
> >
> > Ashwani
> >
> > > ----------
> > > From: Veena
> > > Reply To: Veena
> > > Sent: Wednesday, February 16, 2000 2:58 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: problems with jsp:include to include files dynamically
> > >
> > > Hi all,
> > >
> > >   I have a problem in including files dynamically using jsp:include.
> > >  Below i have placed the code.Please go thru this..and tell me am i
> doing
> > > something wrong.
> > >
> > > Thanks & Regards
> > > Veena
> > >
> =========================================================================
> > > <%-- TestInclude.jsp --%>
> > > <%@ page language="java"%>
> > > <% String a="Veena"; %>
> > > <%! String m="VIDHYA"; %>
> > >
> > > <%
> > > if (session.getValue("staticPage")==null)
> > > session.putValue("staticPage","b.jsp");
> > >
> > >
> > > String newPage=request.getParameter("staticPage");
> > > if (newPage!=null) session.putValue("staticPage",newPage);
> > >
> > > String p= (String)session.getValue("staticPage");
> > > %>
> > >
> > > <HTML>
> > > <BODY>
> > > <BR><BR>
> > > <B>Page <%=p%>:(<%= request.getMethod() %>)</B><BR><BR>
> > > <BR><BR><BR>
> > > <FORM method="post" action="/TestInclude.jsp">
> > > <input type="hidden" name="staticPage" value="c.jsp">
> > > <input type="submit">
> > > </FORM>
> > >
> > > The current date and time are
> > > <%-- here iam including static file --%>
> > > <%@ include file="Date.jsp" %>
> > >
> > > <%--
> > >  here iam including file dynamically based on the condition which is
> not
> > > being included
> > > do u have any idea of why this is happening
> > > --%>
> > > <jsp:include page="<%= p %>" flush="true" />
> > > </BODY>
> > > </HTML>
> > >
> > > ===================================================
> > >
> > > <%-- b.jsp --%>
> > >
> > > <HTML>
> > > <BODY>
> > > This is page B
> > > </BODY>
> > > </HTML>
> > > =======================================
> > > <%-- c.jsp --%>
> > >
> > > <HTML>
> > > <BODY>
> > > This is page C
> > > </BODY>
> > > </HTML>
> > > ===============================
> > > <%-- date.jsp: --%>
> > > <%@ page import="java.util.*" %>
> > > <%= (new java.util.Date() ).toLocaleString() %>
> > > <% System.out.println("the value is ="+a); %>
> > > <% out.println("<br>"); %>
> > > <% out.println(a); %>
> > > =========================
> > >
> > >
>

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