You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Simon Chatfield <si...@inteflux.com> on 2001/04/13 01:13:32 UTC

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


RE: Any reason why this give me error?

Posted by Arik Kfir <ar...@mail.com>.
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: chatfiel@iname.net [mailto:chatfiel@iname.net]On Behalf Of Simon
Chatfield
Sent: Friday, April 13, 2001 1:43 AM
To: tomcat-user@jakarta.apache.org
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: chatfiel@iname.net [mailto:chatfiel@iname.net]On Behalf Of Simon
> Chatfield
> Sent: Friday, April 13, 2001 1:14 AM
> To: tomcat-user@jakarta.apache.org
> 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
> >
> >



Re: Any reason why this give me error?

Posted by Simon Chatfield <si...@inteflux.com>.
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: chatfiel@iname.net [mailto:chatfiel@iname.net]On Behalf Of Simon
> Chatfield
> Sent: Friday, April 13, 2001 1:14 AM
> To: tomcat-user@jakarta.apache.org
> 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
> >
> >


RE: Any reason why this give me error?

Posted by Arik Kfir <ar...@mail.com>.
did you try running this without the enclosing <jsp:include> tag, to see if
your source is generating proper PARAM tags?

-----Original Message-----
From: chatfiel@iname.net [mailto:chatfiel@iname.net]On Behalf Of Simon
Chatfield
Sent: Friday, April 13, 2001 1:14 AM
To: tomcat-user@jakarta.apache.org
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
>
>