You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Michelle Popovits <Mi...@worldinsure.com> on 2002/05/15 14:34:11 UTC

RE: problems migrating struts tags - weblogic 5.1 - 6.1 (has no p roperty)

Hi Max,

Yesterday, I did try adding one of the attributes (testexpr) to the tld file
but it came back with another error, I think it was expected there to be a
method
in the tag which, of course, did not exist.  

Is there something that I missed doing?


Thanks,
Michelle

-----Original Message-----
From: Max Cooper [mailto:max@maxcooper.com]
Sent: Wednesday, May 15, 2002 7:14 AM
To: Struts Users Mailing List
Subject: Re: problems migrating struts tags - weblogic 5.1 - 6.1 (has no
property)


Michelle,

WebLogic 6.1 SP2 requires your use of JSP custom tags to strictly comply
with the TLD, where 5.1 was not so strict. This strictness is a really good
thing, IMHO, because it helps identify errors and such.

You can add those attributes to the TLD to fix the problem. If you haven't
written a TLD before, don't worry because it is pretty easy once you open
the file and see what is in there. I had never written any tags or TLDs
before I started using Struts, and in looking at Struts tags as an example I
found that it is much easier than I expected. Gaining this knowledge has
been a really nice side effect of using Struts for my project -- we now have
a library of really useful, project-specific tags.

-Max

----- Original Message -----
From: "Michelle Popovits" <Mi...@worldinsure.com>
To: <st...@jakarta.apache.org>
Sent: Tuesday, May 14, 2002 12:17 PM
Subject: problems migrating struts tags - weblogic 5.1 - 6.1 (has no
property)


> Hi,
>
> I am currently migrating a struts application from weblogic 5.1 sp11 to
> weblogic 6.1 sp2.
>
> The problem is that the taglibs now complain that they do not have certain
> properties which I had specified.
>
> The html:image jsp tag complains that it has no 'height' property and the
> html:text tag complains that it has no testexpr property (just to name a
> couple).  Even though these tags do not explicitly support these
properties,
> previously they had always passed them through to the resulting html where
> they would be interpreted correctly in the browser.
>
> Any idea why this is happening and what can be done to fix it.
>
> Thanks,
> Michelle
>
>
> I am using Struts 1.0 release, I have also tried the latest mileston beta
> release with the same results.
>
> Example Error Output:
> /jsps/account/AccountInfo.jspf(173): for tag 'text' handler type
> 'org.apache.struts.taglib.html.TextTag' has no property 'testexpr'
> probably occurred due to an error in /jsps/account/AccountInfo.jspf line
> 173:
> <td class="label"><strutshtml:text testexpr="eMail"
property="account.email"
> size="60" maxlength="32" /></td>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: problems migrating struts tags - weblogic 5.1 - 6.1 (has no property)

Posted by Max Cooper <ma...@maxcooper.com>.
Oops, oh yeah, I guess that is a problem. I don't have a good solution, but
I can think of a few things that might be worth investigation/consideration:

1. See if you can turn strict checking off in weblogic.xml
2. Add the methods you need to the tag handler classes. (sounds painful)
3. Figure out how to modify the tag handler class to pass-thru any
unrecognized attributes, perhaps using a proxy object to intecept the setter
calls (if that will pass the compiler) or perhaps there is some way to map
all the attribute setter calls to a single dummy method, and then write out
any unrecognized attributes if you can retrieve them somehow. This doesn't
seem like a promising avenue of investigation to me at this point.
4. Find some alternative to using the unrecognized attributes and eliminate
them from the tags in your JSP. Not a very attractive alternative, I know.

Well, I hope #1 turns out to be a possibility.

Good luck,
-Max

----- Original Message -----
From: "Michelle Popovits" <Mi...@worldinsure.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Wednesday, May 15, 2002 5:34 AM
Subject: RE: problems migrating struts tags - weblogic 5.1 - 6.1 (has no
property)


> Hi Max,
>
> Yesterday, I did try adding one of the attributes (testexpr) to the tld
file
> but it came back with another error, I think it was expected there to be a
> method
> in the tag which, of course, did not exist.
>
> Is there something that I missed doing?
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: problems migrating struts tags - weblogic 5.1 - 6.1 (has no property)

Posted by Bart Schrever <ba...@pandora.be>.
Indeed, if you specify some additional tag attribute in the tld file,

simular get... en set... methods must be available in the class file
defining the tag.

ex: when you add attribute testexp in html:text,
a getTestexp() and setTestexp(Object ...) should exist in the class TextTag

-----Oorspronkelijk bericht-----
Van: Michelle Popovits [mailto:Michelle.Popovits@worldinsure.com]
Verzonden: woensdag 15 mei 2002 14:34
Aan: 'Struts Users Mailing List'
Onderwerp: RE: problems migrating struts tags - weblogic 5.1 - 6.1 (has
no property)


Hi Max,

Yesterday, I did try adding one of the attributes (testexpr) to the tld file
but it came back with another error, I think it was expected there to be a
method
in the tag which, of course, did not exist.

Is there something that I missed doing?


Thanks,
Michelle

-----Original Message-----
From: Max Cooper [mailto:max@maxcooper.com]
Sent: Wednesday, May 15, 2002 7:14 AM
To: Struts Users Mailing List
Subject: Re: problems migrating struts tags - weblogic 5.1 - 6.1 (has no
property)


Michelle,

WebLogic 6.1 SP2 requires your use of JSP custom tags to strictly comply
with the TLD, where 5.1 was not so strict. This strictness is a really good
thing, IMHO, because it helps identify errors and such.

You can add those attributes to the TLD to fix the problem. If you haven't
written a TLD before, don't worry because it is pretty easy once you open
the file and see what is in there. I had never written any tags or TLDs
before I started using Struts, and in looking at Struts tags as an example I
found that it is much easier than I expected. Gaining this knowledge has
been a really nice side effect of using Struts for my project -- we now have
a library of really useful, project-specific tags.

-Max

----- Original Message -----
From: "Michelle Popovits" <Mi...@worldinsure.com>
To: <st...@jakarta.apache.org>
Sent: Tuesday, May 14, 2002 12:17 PM
Subject: problems migrating struts tags - weblogic 5.1 - 6.1 (has no
property)


> Hi,
>
> I am currently migrating a struts application from weblogic 5.1 sp11 to
> weblogic 6.1 sp2.
>
> The problem is that the taglibs now complain that they do not have certain
> properties which I had specified.
>
> The html:image jsp tag complains that it has no 'height' property and the
> html:text tag complains that it has no testexpr property (just to name a
> couple).  Even though these tags do not explicitly support these
properties,
> previously they had always passed them through to the resulting html where
> they would be interpreted correctly in the browser.
>
> Any idea why this is happening and what can be done to fix it.
>
> Thanks,
> Michelle
>
>
> I am using Struts 1.0 release, I have also tried the latest mileston beta
> release with the same results.
>
> Example Error Output:
> /jsps/account/AccountInfo.jspf(173): for tag 'text' handler type
> 'org.apache.struts.taglib.html.TextTag' has no property 'testexpr'
> probably occurred due to an error in /jsps/account/AccountInfo.jspf line
> 173:
> <td class="label"><strutshtml:text testexpr="eMail"
property="account.email"
> size="60" maxlength="32" /></td>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>