I have done this type of thins in servlets, but not in JSP.  This is it in
servlets:
<%
        ServletConfig cfg=getServletConfig();
        ServletContext cnt=cfg.getServletContext();
        for(int i=1; i<10; i++)
        {
                RequestDispatcher
rd=cnt.getRequestDispatcher("something"+i+".html");
                rd.include(request,response);
        }
%>

This uses the request, and response objects, which are passed to methods
in the servlet.

The problem is gaining access to the HttpServletRequest, and
HttpServletResponse objects.

In GNUJsp and JRun, they're called response, and request.

Does anyone know if this is specified in the JSP spec?


Eoin Curran.



> -----Original Message-----
> From: Arnaud Vandyck [mailto:[EMAIL PROTECTED]]
> Sent: 27 August 1999 15:22
> To: [EMAIL PROTECTED]
> Subject: howTo <%@ include file = "<% valueOfMyString %>" %>
>
>
> I try to include different pages with the same prefixe and
> suffixe but with
> a variable between:
>
> for (int i=1; i<10; i++)
>     <%@include file= "something" + i + ".html" %>
>
> HOW CAN I DO THAT?
>
> ==============================================================
> =============
> 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