struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 19183] - DynaValidatorForm and Normal ActionForm
Date Wed, 07 May 2003 05:15:21 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19183>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19183

DynaValidatorForm and Normal ActionForm





------- Additional Comments From ralphschaer@yahoo.com  2003-05-07 05:15 -------
Thanks for the link. But as I understand the warning, this could happen
when there are more than one config file for one module.

(WARNING - If you define an object of the same name in more than one
configuration file, the last one loaded quietly wins)


In my case there are two independant modules. IMHO here it should be
possible to use a name twice.

        <init-param>
            <param-name>config</param-name>
            <param-value>/WEB-INF/struts-config.xml</param-value>
        </init-param>
        <init-param>
            <param-name>config/admin</param-name>
            <param-value>/WEB-INF/struts-config-admin.xml</param-value>
        </init-param>

        
The probelm has also nothing to do with configuration it happens at
runtime, when RequestUtil tries to recycle instances.

The problem is easy to fix.

Line 719 in RequestUtil
String className = ((DynaBean) instance).getDynaClass().getName();

Before casting 'instance' the program should check if 'instance' is really a
DynaBean

if (instance instanceof DynaBean) {
  String className = ((DynaBean) instance).getDynaClass().getName();
  .
  .
  .
}

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Mime
View raw message