> 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" %>
There's no way to do this at translation time, but you could get the
same effect if you're willing to do it at request time and use a
scriptlet instead of a JSP tag:
<%
ServletConfig sconf = getServletConfig();
ServletContext scont = sconf.getServletContext();
for(int i=0;i<10;i++) {
RequestDispatcher rd = scont.getRequestDispatcher(
"/something" + i + ".html");
rd.include(request,response);
}
%>
Note the paths you pass to getRequestDispatcher() must start with a
slash.
- Larne Pekowsky
===========================================================================
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