well, according to the JSP documentation, only the *value* attribute can
receive expression values (meaning <%= expressions).
But even that doesn't work properly - the following, for example, won't
work:
<jsp:include page="a.jsp" flush="true">
<jsp:param name="a" value="<%= request.getParameter ("a") %>" />
</jsp:include>
HOWEVER this DOES work:
<%
String variable = request.getParameter("a");
%>
<jsp:include page="a.jsp" flush="true">
<jsp:param name="a" value="<%= variable %>" />
</jsp:include>
If there are any Tomcat developers listening - please check this out, its a
possible bug..
Regards...
Arik.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Simon
Chatfield
Sent: Friday, April 13, 2001 1:43 AM
To: [EMAIL PROTECTED]
Subject: Re: Any reason why this give me error?
It never creates the java source code, or rather, it creates the .java file
but
it's empty as the file isn't correctly parsed, when I remove the include
tags
as you suggested, the page compiles fine... What can we accertain from that?
Arik Kfir wrote:
> did you try running this without the enclosing <jsp:include> tag, to see
if
> your source is generating proper PARAM tags?
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Simon
> Chatfield
> Sent: Friday, April 13, 2001 1:14 AM
> To: [EMAIL PROTECTED]
> Subject: Any reason why this give me error?
>
> 2nd. post. ? any clues?
>
> Simon Chatfield wrote:
>
> >
> >
> > I hope this is a simple answer for someone, but I'm having the following
> error
> >
> > with a peice of code that follows that. I did try the <jsp:params>
> directive but it complained
> >
> > about not having a name and value attribute as well.
> >
> > org.apache.jasper.compiler.ParseException:
> /thdir/htdocs/viewEvent.jsp(185,0)
> >
> > Expected "param" tag with "name" and "value" attributes after the
"params"
> tag.
> >
> > <jsp:include page="<%=thisLink.getValue()%>" flush="true">
> > <%
> > Enumeration en = request.getParameterNames();
> > while(en.hasMoreElements()) {
> > String thisParm = (String)en.nextElement();
> > %>
> > <jsp:param name="<%=thisParm%>"
> value="<%=request.getParameter(thisParm)%>"/>
> > <%
> > }
> > %>
> > </jsp:include>
> >
> > Thanks
> >
> > -Simon
> >
> >