Howdy, folks.
One of my apps has been merrily using "Struts 1.1 - Release
Candidate 1" for a while now. I noticed that the Final Release for 1.1
had come out, so I recently decided to upgrade. The upgrade from Struts
1.0 to Struts 1.1 RC1 was quick and painless, so I figured that it would
be a real slamdunk to go from a Release Candidate to a Final Release.
Unfortunately, not the case for me...
One of my forms uses a nested:define tag to set a String property into an id.
The property is
defined as an attribute of the bean being iterated with the enclosing
nested:iterate tag, is defined as a String, and does have a corresponding
get method. Plus, this worked fine before this upgrade. After the
nested:define, I use this String and in the process try to call the String
trim() method on it, like this:
<nested:define id="myAttr" property="myAttrValue" />
<% String tiptext = myAttr.trim() + " -- some other stuff"; %>
When I go to hit this page, I get a compilation error. It tells
me that it cannot resolve symbol (symbol : method trim() , location :
class java.lang.Object). Why does it no longer treat it as the type
defined as the String return type of the getMyAttrValue() method of the
bean??
I actually found what's doing it. There's a difference between
the old struts-nested.tld file and the new one where the nested:define tag
is concerned. The old one delegated to the old DefineTEI class for the
extra info, while the new one points to a new NestedDefineTEI class. If I
switch that back to use the DefineTEI class, I don't get the compilation
error. But this concerns me, because I don't know why the new stuff
behaves worse than the old stuff and what else might be busted.
Anyone else run into this and can offer any explanation as to why
this is misbehaving and what is the best way to fix this? Also, any other
little nasties like this popping up on you in the "final release"? (Others here have
run into their own different problems with the
upgrade...) Is it really stable? Or should I stick with the Release
Candidate until further notice?
Thanks for your time and assistance!!
-Jeff