tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: org.apache.jasper.JasperException: Unable to compile class for JSPC
Date Tue, 22 Aug 2000 15:54:37 GMT
Erik Grøntoft Dybdahl wrote:

> Seems I found the answer to my own question:
> Nested tags can not have attributes with identical names.
> Is this really so?
>

It is not clear from your description, but it sounds like you are using a
TagExtraInfo class for both the <itemGroup> and <item> tags, and you have told
both of them to create an page-scope bean named "id".  You only need to create
attributes in the first place if you need to make beans available to other tags
on the page -- and usually, something like your <item> tag would not need to do
that.

The issue is not whether the attribute names are the same or not -- it's an
issue of whether you are having both tags declare a variable with the same name,
which is an error with JSP just like it is with any programming language.

Craig McClanahan


>
> ----- Original Message -----
> From: "Erik Grøntoft Dybdahl" <erik.dybdahl@tellus.no>
> To: <taglibs-user@jakarta.apache.org>
> Sent: Tuesday, August 22, 2000 9:17 AM
> Subject: org.apache.jasper.JasperException: Unable to compile class for JSPC
>
> >
> > Hello,
> > I'm sorry if this is the wrong place for such questions, but I did not
> find
> > any other resources.
> >
> > I have two nested tags, each of them with an attribute, like this:
> > <tellus:itemGroup groupId="ACTIVITY">
> > <tellus:item itemId="CrossCountry"/>
> > </tellus:itemGroup>
> >
> > This causes a compilation error, because the generated source tries to
> > declare a variable
> > named id two times in the same scope:
> >
> >                  String id = null;
> >                     id = (String) pageContext.findAttribute("id");
> >
> > It  is not clear to me what is going on here, though.
> > Can anybody explain (or tell me where such questions should be placed)?
> >
> > I use TomCat 3.1.
> >
> > Thanks,
> > erik
> >


Mime
View raw message