tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Sand" <rs...@vgalleries.com>
Subject Re: rtexprvalue apparently being ignored for xtag forEach select parameter
Date Wed, 19 Dec 2001 10:28:11 GMT
Hi James-

I tried both actually, neither work.  It just seems that the expression is
not being evaluated!  I'd suspect something in Tomcat4 or the servlet api
but I have other custom tags in the same page that include java expressions
in their variables and they work.  When I put the whole expression in a
variable (your second suggestion), my page returns empty, and when I put the
expression into my select parameter (your first suggestion), the exception
changes to:

org.apache.jasper.compiler.ParseException: /help/help.jsp(45,28) Attribute
has no value
	at
org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:563)

What else can I check?  Of course, if I go back to hardcoded "topic" or
"keyword" so there is no expression in the select parameter, the page works,
so I know its not a problem with my data or expression.

Thanks!

-Richard

----- Original Message -----
From: "James Strachan" <james_strachan@yahoo.co.uk>
To: "Tag Libraries Users List" <taglibs-user@jakarta.apache.org>
Sent: Wednesday, December 19, 2001 11:13 AM
Subject: Re: rtexprvalue apparently being ignored for xtag forEach select
parameter


> Hi Richard
>
> ----- Original Message -----
> From: "Richard Sand" <rsand@vgalleries.com>
> > Hi,
> >
> > My xtags tag is:
> >
> > <xtags:forEach
> > select="/help/<%=subjectstr%>[<%=subjectstr%>-key=$subjectkey][1]">
>
> Try building up the xpath in one single expression. e.g.
>
> <xtags:forEach select="<%= "/help" + subjectstr + "[" + subjectstr +
> "-key=$subjectjey][1]" %>"/>
>
> Or using a variable for the XPath expression...
>
> <% String xpath = "/help" + subjectstr + "[" + subjectstr +
> "-key=$subjectjey][1]"; %>
>
> <xtags:forEach select="<%  xpath %>"/>
>
> James
>
>
> >
> > where subjectstr is a string that can be set to "topic" or "keyword".
> >
> > However, I get the following exception:
> >
> > Message: org.dom4j.InvalidXPathException: Invalid XPath expression:
> > /help/[-key=$subjectkey][1] Expected one of '.', '..', '@', '*',
> >
> > You can see from the exception that the variable 'subjectstr' is not
being
> > put into the expression.  I commented out the rest of my code and left
> > <%=subjectstr%> there just to make sure that the variable was set
properly
> > and it was.  It seems to me like the "rtexprvalue" is being ignored from
> the
> > tld for the select parameter.
> >
> > Has anyone else seen this behavior?
> >
> > I'm using Tomcat 4.01 on W2k.
> >
> > Thanks!
> >
> > Best regards,
> >
> > Richard
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:taglibs-user-help@jakarta.apache.org>
> >
> >
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> To unsubscribe, e-mail:
<mailto:taglibs-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:taglibs-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message