Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   JSTL version Tomcat vs Resin - Unable to find setter method - set(Object) (http://www.velocityreviews.com/forums/t388501-jstl-version-tomcat-vs-resin-unable-to-find-setter-method-set-object.html)

kebabkongen@hotmail.com 11-10-2006 10:04 AM

JSTL version Tomcat vs Resin - Unable to find setter method - set(Object)
 
Hi!
We just changed our web container from Resin to Tomcat, and now we have
problems with our JSTL code. Seems as if setter mothods taking Object
as parameter (not String) works with Resin web container and not with
Tomcat?
Does anybody have any ideas how this could be?

I wondered if it could have anything with the JSTL library version,
that perhaps this was something that was fixed in a newer JSTL library?
In out jstl.jar library it seems as if we are using version 1.1.2:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.1
Created-By: 1.4.2-38 ("Apple Computer, Inc.")
Specification-Title: JavaServer Pages Standard Tag Library (JSTL)
Specification-Version: 1.1
Implementation-Title: JavaServer Pages Standard Tag Library API Refere
nce Implementation
Implementation-Version: 1.1.2
Implementation-Vendor: Sun Microsystems, Inc.
Implementation-Vendor-Id: com.sun
Extension-Name: javax.servlet.jsp.jstl

I cant find any newer implementation on JSTL homepage:
http://jakarta.apache.org/taglibs/do...doc/intro.html
....even though this implementations are rather old(!) (from 2004)

Any tips / ideas would be much appreciated!

Regards, Per Magnus


Manish Pandit 11-10-2006 05:49 PM

Re: JSTL version Tomcat vs Resin - Unable to find setter method - set(Object)
 
Hi!

Is there a set of particular tags that have ceased to work? Are you
seeing any errors during translation/runtime in the Tomcat logs? How
about custom tag handlers (if your app uses them) - are they able to
handle objects in Tomcat?

-cheers,
Manish


kebabkongen@hotmail.com 11-14-2006 11:42 AM

Re: JSTL version Tomcat vs Resin - Unable to find setter method - set(Object)
 
Hi, in the Java class we used to have:

setSomeProperty(Object myObj) {
...
if (myObj instanceof SomeObj) {
...
} else if (myObj instanceof SomeOtherObj) {
...
}
}


This worked fine with Resin container, but stopped working with Tomcat
(same jstl.jar library)

We found a solution to the problem, though, by rewriting the java code
to specify what object the setter method should use (seems as if
general Object is not allowed in Tomcat for setter methods??).
So this resulted in two setter methods (Polymorfism?) instead of one:

setSomeProperty(SomeObj myObj) {
...
}

setSomeProperty(SomeOtherObj myObj) {
...
}


Regards, Per Magnus

Manish Pandit skrev:
> Hi!
>
> Is there a set of particular tags that have ceased to work? Are you
> seeing any errors during translation/runtime in the Tomcat logs? How
> about custom tag handlers (if your app uses them) - are they able to
> handle objects in Tomcat?
>
> -cheers,
> Manish




All times are GMT. The time now is 04:03 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.