You're missing an "=" in your jsp:include statement. Try this:
<jsp:include page="<%= request.getParameter("pagina") %>" />
You have it correct in your second example, which is why that one works.
Thanks,
--jeff
----- Original Message -----
From: "Antoni Reus" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 18, 2001 4:58 AM
Subject: request and jsp:include
> Hi, first of all I would like to excuse for my poor english.
>
> I'm using tomcat 3.2.2 in a Win NT 4
>
> I'm trying to do some kinda printing template, so calling de template (
> imprimir.jsp )
> with a parameter for the page to show it whould display it in a
> printer friendly way.
>
> In imprimir.jsp is something like this:
>
> <html>
> ...
> ...
> <jsp:include page="<%request.getParameter("pagina") %>" />
> ...
> ..
> </html>
>
> when I call localhost:8080/imprimir.jsp?pagina=listado.jsp
> I get a tomcat exception when parsing imprimir.jsp, saying that
> pagina has no value.
>
> But if I write imprimr.jsp this way:
>
> <html>
> ...
> ...
> <%! String pagina = request.getParameter("pagina");
> %>
> <jsp:include page="<%=pagina %>" />
> ...
> ..
> </html>
>
> it works!!
>
> Someone could explain this???
>