You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mike Cannon-Brookes <mc...@internet.com> on 2000/06/26 07:17:47 UTC

Read only tag attributes?

G'day all,

Deployed all the WARs with Orion now - my last instructions should work
perfectly.

However when accessing the registration page I get:

"Error parsing JSP page /registration.jsp line 32
Property 'size' of bean/tag 'org.apache.struts.taglib.TextTag' is read only"

Any Struts / Orion users ever seen it? I've used custom tags under Orion for
ages and this one has me baffled.

Mike


RE: Read only tag attributes?

Posted by Kevin Duffey <kd...@buymedia.com>.
Hi,

> > Already checked this. It has two setSize() methods, one for
> int's and one
> > for String's. I have a sneaking suspicion this may be the problem (two
> > methods) as I know the spec is very vague about whether this sort of
> > overloading is allowed.
> >
>
> I think you're right ... Depending on how Orion chooses to implement bean
> introspection, it's entirely possible that it will decide there
> is no setter
> method there (even though there are two of them) and thus decide
> that the bean
> is read-only.
>
> I really should not have two setters -- and I suspect there are
> problems on some
> containers if there is only the "int" version of the setter
> (which is the way it
> really should be).  I will do some experiments and try to correct
> this ASAP.
>
> >
> > Have you got the text tag working under Orion? If so the above
> can't be the
> > problem. What about the struts-example?
> >
>
> What's puzzling to me is why Kevin didn't run into this.  Are you
> guys running
> the same versions of Orion?  How about JVMs?

I'll clear this up. I never used the tag. :) I merely was responding to what
I thought might be the problem. Sorry to confuse you.


Re: Read only tag attributes?

Posted by Eduardo Pelegri--Llopart <Ed...@eng.sun.com>.
check the errata # 6 in
http://java.sun.com/products/jsp/errata_1_1_a_042800.html

	- eduard/o

Mike Cannon-Brookes wrote:
> 
> > From: Craig R. McClanahan [mailto:Craig.McClanahan@eng.sun.com]
> >
> > Mike Cannon-Brookes wrote:
> >
> > > Kevin,
> > >
> > > Already checked this. It has two setSize() methods, one for
> > int's and one
> > > for String's. I have a sneaking suspicion this may be the problem (two
> > > methods) as I know the spec is very vague about whether this sort of
> > > overloading is allowed.
> > >
> >
> > I think you're right ... Depending on how Orion chooses to implement bean
> > introspection, it's entirely possible that it will decide there
> > is no setter
> > method there (even though there are two of them) and thus decide
> > that the bean
> > is read-only.
> >
> > I really should not have two setters -- and I suspect there are
> > problems on some
> > containers if there is only the "int" version of the setter
> > (which is the way it
> > really should be).  I will do some experiments and try to correct
> > this ASAP.
> >
> > >
> > > Have you got the text tag working under Orion? If so the above
> > can't be the
> > > problem. What about the struts-example?
> > >
> >
> > What's puzzling to me is why Kevin didn't run into this.  Are you
> > guys running
> > the same versions of Orion?  How about JVMs?
> >
> 
> The oddest thing is that I installed an older version at home last night and
> the example didn't die at that point. (Incidentally it threw up trying to
> add a mail host). At home I installed the build from the 19th of June (no
> read only error), and at work I installed the build from 25th June (has a
> readonly error) - what has changed between these two dates with the TextTag?
> (Or any of it's superclasses?)
> 
> Should give you a big headstart on finding the problem!
> 
> Mike

RE: Read only tag attributes?

Posted by Mike Cannon-Brookes <mi...@bookmarkbox.com>.
> From: Craig R. McClanahan [mailto:Craig.McClanahan@eng.sun.com]
>
> Mike Cannon-Brookes wrote:
>
> > Kevin,
> >
> > Already checked this. It has two setSize() methods, one for
> int's and one
> > for String's. I have a sneaking suspicion this may be the problem (two
> > methods) as I know the spec is very vague about whether this sort of
> > overloading is allowed.
> >
>
> I think you're right ... Depending on how Orion chooses to implement bean
> introspection, it's entirely possible that it will decide there
> is no setter
> method there (even though there are two of them) and thus decide
> that the bean
> is read-only.
>
> I really should not have two setters -- and I suspect there are
> problems on some
> containers if there is only the "int" version of the setter
> (which is the way it
> really should be).  I will do some experiments and try to correct
> this ASAP.
>
> >
> > Have you got the text tag working under Orion? If so the above
> can't be the
> > problem. What about the struts-example?
> >
>
> What's puzzling to me is why Kevin didn't run into this.  Are you
> guys running
> the same versions of Orion?  How about JVMs?
>

The oddest thing is that I installed an older version at home last night and
the example didn't die at that point. (Incidentally it threw up trying to
add a mail host). At home I installed the build from the 19th of June (no
read only error), and at work I installed the build from 25th June (has a
readonly error) - what has changed between these two dates with the TextTag?
(Or any of it's superclasses?)

Should give you a big headstart on finding the problem!

Mike


Re: Read only tag attributes?

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Mike Cannon-Brookes wrote:

> Kevin,
>
> Already checked this. It has two setSize() methods, one for int's and one
> for String's. I have a sneaking suspicion this may be the problem (two
> methods) as I know the spec is very vague about whether this sort of
> overloading is allowed.
>

I think you're right ... Depending on how Orion chooses to implement bean
introspection, it's entirely possible that it will decide there is no setter
method there (even though there are two of them) and thus decide that the bean
is read-only.

I really should not have two setters -- and I suspect there are problems on some
containers if there is only the "int" version of the setter (which is the way it
really should be).  I will do some experiments and try to correct this ASAP.

>
> Have you got the text tag working under Orion? If so the above can't be the
> problem. What about the struts-example?
>

What's puzzling to me is why Kevin didn't run into this.  Are you guys running
the same versions of Orion?  How about JVMs?

>
> Mike
>

Craig





RE: Read only tag attributes?

Posted by Kevin Duffey <kd...@buymedia.com>.
Hi,

I haven't tried using it myself..Craig is probably the one to ask about
that. I would think only one method is allowed..but it is a taglib, not a
setter method for a javabean, so its possible it is allowed in the taglib
itself.

> Kevin,
>
> Already checked this. It has two setSize() methods, one for int's and one
> for String's. I have a sneaking suspicion this may be the problem (two
> methods) as I know the spec is very vague about whether this sort of
> overloading is allowed.
>
> Have you got the text tag working under Orion? If so the above
> can't be the
> problem. What about the struts-example?
>
> Mike
>
> -----Original Message-----
> From: Kevin Duffey [mailto:kduffey@buymedia.com]
> > Deployed all the WARs with Orion now - my last instructions should work
> > perfectly.
> >
> > However when accessing the registration page I get:
> >
> > "Error parsing JSP page /registration.jsp line 32
> > Property 'size' of bean/tag 'org.apache.struts.taglib.TextTag' is
> > read only"
> >
> > Any Struts / Orion users ever seen it? I've used custom tags
> > under Orion for
> > ages and this one has me baffled.
>
> I bet the code for the taglib doesn't have a set method in the taglib code
> that matches the attribute name. Look at the source of TextTag
> and see if it
> has a setSize() method..it could be mispelled or something. Or,
> maybe Craig
> meant for it to be this way.
>
>


RE: Read only tag attributes?

Posted by Mike Cannon-Brookes <mc...@internet.com>.
Kevin,

Already checked this. It has two setSize() methods, one for int's and one
for String's. I have a sneaking suspicion this may be the problem (two
methods) as I know the spec is very vague about whether this sort of
overloading is allowed.

Have you got the text tag working under Orion? If so the above can't be the
problem. What about the struts-example?

Mike

-----Original Message-----
From: Kevin Duffey [mailto:kduffey@buymedia.com]
> Deployed all the WARs with Orion now - my last instructions should work
> perfectly.
>
> However when accessing the registration page I get:
>
> "Error parsing JSP page /registration.jsp line 32
> Property 'size' of bean/tag 'org.apache.struts.taglib.TextTag' is
> read only"
>
> Any Struts / Orion users ever seen it? I've used custom tags
> under Orion for
> ages and this one has me baffled.

I bet the code for the taglib doesn't have a set method in the taglib code
that matches the attribute name. Look at the source of TextTag and see if it
has a setSize() method..it could be mispelled or something. Or, maybe Craig
meant for it to be this way.


RE: Read only tag attributes?

Posted by Kevin Duffey <kd...@buymedia.com>.
Hi,


> Deployed all the WARs with Orion now - my last instructions should work
> perfectly.
>
> However when accessing the registration page I get:
>
> "Error parsing JSP page /registration.jsp line 32
> Property 'size' of bean/tag 'org.apache.struts.taglib.TextTag' is
> read only"
>
> Any Struts / Orion users ever seen it? I've used custom tags
> under Orion for
> ages and this one has me baffled.

I bet the code for the taglib doesn't have a set method in the taglib code
that matches the attribute name. Look at the source of TextTag and see if it
has a setSize() method..it could be mispelled or something. Or, maybe Craig
meant for it to be this way.