Just so it's clear, I'm assuming that you have the "get" method
overloaded, with the same method name being used for two different
properties (even if you consider them the same conceptual property).

I would guess that's always a bad idea.  I'm somewhat surprised that it
works on one platform with the same appserver, and doesn't on the other.
Are they using the same WLS version and JDK version?

-----Original Message-----
From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 26, 2004 10:47 AM
To: Struts User List ([EMAIL PROTECTED])
Subject: Problem with tags and overloaded methods


I've got a FormBean that includes a collection of beans. I have two
getters for this collection: one indexed, and one not indexed. The
non-indexed one returns the entire collection, the indexed one returns a
single member of the collection. The normal arrangement.

I use JSTL tags to refer to the unindexed getter: a <c:choose
...><c:when ..> set that tests whether the collection is empty, then a
<c:forEach...> tag that puts the contents on the page.

I have a copy of BEA Weblogic on my local machine, for development. In
that environment everything works perfectly. Then there's another copy
of BEA Weblogic on a Unix box that's available to everybody. That's
where I put my WAR file when I've got it working, so others can use it,
and find bugs, etc.

But the application fails on that "public" server. It tells me that it
is "unable to find a value for "allItems" in object of class
"......ItemBeanList". Changing the name of the unindexed getter, so that
it's no longer an overloaded function, makes it work.

I can't figure out why this works on my desktop and fails on the server.
All tld and jar files for the tags are included in the WAR file.


--
Tim Slattery
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to