struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-3843) overriding default typeconverters in struts.xml does not work
Date Fri, 20 Jul 2012 21:47:34 GMT

    [ https://issues.apache.org/jira/browse/WW-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13419599#comment-13419599
] 

Hudson commented on WW-3843:
----------------------------

Integrated in Struts2 #499 (See [https://builds.apache.org/job/Struts2/499/])
    WW-3843 adds proper extension points (Revision 1363947)

     Result = SUCCESS
lukaszlenart : 
Files : 
* /struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java
* /struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/BeanSelectionProvider.java
* /struts/struts2/trunk/core/src/main/resources/struts-default.xml
* /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/XWorkConstants.java
* /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
* /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/MockConfiguration.java
* /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java
* /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkBasicConverter.java
* /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/AliasInterceptor.java
* /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
* /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/StaticParametersInterceptor.java
* /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
* /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
* /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/CompoundRootAccessor.java

                
> overriding default typeconverters in struts.xml does not work
> -------------------------------------------------------------
>
>                 Key: WW-3843
>                 URL: https://issues.apache.org/jira/browse/WW-3843
>             Project: Struts 2
>          Issue Type: Bug
>          Components: XML Configuration
>    Affects Versions: 2.3.4
>            Reporter: Pierre Templier
>            Assignee: Lukasz Lenart
>             Fix For: 2.3.5
>
>
> according to the docs one can override default
> typeconverters (cf:
> http://struts.apache.org/2.3.4/xwork-core/apidocs/com/opensymphony/xwork2/conversion/impl/XWorkBasicConverter.html
> )
> == Quote from the docs
> As from version 2.3.2 you can override default converters by
> implementting TypeConverter interface and specifying beans in
> struts.xml as follow: <bean
> type="com.opensymphony.xwork2.conversion.TypeConverter"
> name="collection" class="com.application.MyCollectionConverter"
> scope="singleton"/>
> I tried with that approach by creating a new TypeConverter (roughly
> copied from com.opensymphony.xwork2.conversion.impl.NumberConverter)
> adding the following line in struts.xml right after the <struts> tag
> <bean type="com.opensymphony.xwork2.conversion.TypeConverter"
> name="number" class="com.company.app.NumberConverter"
> scope="singleton"/>
> but the webapp failed to start with the following error.
> Caused by: Bean type interface
> com.opensymphony.xwork2.conversion.TypeConverter with the name number
> has already been loaded by [unknown location] - bean -
> file:/D:/dev/tomcat/webapps/blank/WEB-INF/classes/struts.xml:10:132
>        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:227)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message