You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Jung Kwang Sun (JIRA)" <ji...@apache.org> on 2007/06/05 09:18:28 UTC
[jira] Created: (WW-1966) struts.configuration.files doesn't work,
or work incorrectly
struts.configuration.files doesn't work, or work incorrectly
------------------------------------------------------------
Key: WW-1966
URL: https://issues.apache.org/struts/browse/WW-1966
Project: Struts 2
Issue Type: Bug
Components: Configuration
Affects Versions: 2.0.6
Environment: struts2.0.6
eclipse3.2 wtp
tomcat 5.5
Reporter: Jung Kwang Sun
Assignee: David Evans
I tested the struts.configuration.files properties for special cases, and found a kind of bug.
With the struts-showcases-2.0.6, I remove the <include file="struts-tags.xml"/> line in the struts.xml.
And add the following line in the struts.properties :
struts.configuration.files=struts-default.xml,struts-plugin.xml,struts.xml,struts-tags.xml
Then when I accessed the tags-related action, exception happened(no action or result exception)...
Is this a incorrect attempt? or bug?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (WW-1966) "struts.configuration.files" setting
does not work in application-specific struts.properties files
Posted by "James Holmes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-1966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Holmes reassigned WW-1966:
--------------------------------
Assignee: James Holmes (was: David Evans)
> "struts.configuration.files" setting does not work in application-specific struts.properties files
> --------------------------------------------------------------------------------------------------
>
> Key: WW-1966
> URL: https://issues.apache.org/struts/browse/WW-1966
> Project: Struts 2
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 2.0.6, 2.0.7, 2.0.8
> Environment: struts2.0.6
> eclipse3.2 wtp
> tomcat 5.5
> Reporter: Jung Kwang Sun
> Assignee: James Holmes
> Fix For: 2.0.10
>
>
> I tested the struts.configuration.files properties for special cases, and found a kind of bug.
> With the struts-showcases-2.0.6, I remove the <include file="struts-tags.xml"/> line in the struts.xml.
> And add the following line in the struts.properties :
> struts.configuration.files=struts-default.xml,struts-plugin.xml,struts.xml,struts-tags.xml
> Then when I accessed the tags-related action, exception happened(no action or result exception)...
> Is this a incorrect attempt? or bug?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-1966) "struts.configuration.files" setting not
implemented
Posted by "James Holmes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-1966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Holmes updated WW-1966:
-----------------------------
Affects Version/s: 2.0.10
2.0.9
Fix Version/s: (was: 2.0.10)
2.0.11
Moving to 2.0.11 in preparation for 2.0.10 release.
> "struts.configuration.files" setting not implemented
> ----------------------------------------------------
>
> Key: WW-1966
> URL: https://issues.apache.org/struts/browse/WW-1966
> Project: Struts 2
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.0.10
> Environment: struts2.0.6
> eclipse3.2 wtp
> tomcat 5.5
> Reporter: Jung Kwang Sun
> Assignee: James Holmes
> Fix For: 2.0.11
>
>
> I tested the struts.configuration.files properties for special cases, and found a kind of bug.
> With the struts-showcases-2.0.6, I remove the <include file="struts-tags.xml"/> line in the struts.xml.
> And add the following line in the struts.properties :
> struts.configuration.files=struts-default.xml,struts-plugin.xml,struts.xml,struts-tags.xml
> Then when I accessed the tags-related action, exception happened(no action or result exception)...
> Is this a incorrect attempt? or bug?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-1966) "struts.configuration.files" setting does
not work in application-specific struts.properties files
Posted by "James Holmes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-1966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Holmes updated WW-1966:
-----------------------------
Affects Version/s: 2.0.7
2.0.8
Fix Version/s: (was: Future)
2.0.10
Summary: "struts.configuration.files" setting does not work in application-specific struts.properties files (was: struts.configuration.files doesn't work, or work incorrectly)
I did some research into this and I figured out why changing the "struts.configuration.files" setting in an application-specific struts.properties file is not loading the struts-tags.xml file. The reason is because currently Struts 2 loads the struts*.xml files before it loads in the application-specific struts.properties file. That means that Struts 2 will never use the "struts.configuration.files" setting specified in the application-specific struts.properties file.
On top of that, unless I'm missing something, Struts 2 never even uses the "struts.configuration.files" setting (even when specified in default.properties in the Struts 2 core JAR file). This is a bug for sure.
The problem lies in the org.apache.struts2.dispatcher.Dispatcher.init() method. Currently executes the following:
init_DefaultProperties(); // [1]
init_TraditionalXmlConfigurations(); // [2]
init_LegacyStrutsProperties(); // [3]
init_ZeroConfiguration(); // [4]
...
In order for this issue to be resolved the order needs to be changed so that application-specific struts.properties files are loaded before struts.xml files.
init_DefaultProperties(); // [1]
init_LegacyStrutsProperties(); // [2] <-- now done 2nd, not 3rd
init_TraditionalXmlConfigurations(); // [3]
init_ZeroConfiguration(); // [4]
...
I don't know what the ramifications of changing the order of loading properties files versus xml config files are. Anyone else know?
As a side note, the "struts.configuration.files" setting currently will also be ignored if specified in struts.xml file using a <constant> tag like the following:
<constant name=""struts.configuration.files" value="struts-default.xml,struts-plugin.xml,struts.xml,struts-tags.xml"/>
> "struts.configuration.files" setting does not work in application-specific struts.properties files
> --------------------------------------------------------------------------------------------------
>
> Key: WW-1966
> URL: https://issues.apache.org/struts/browse/WW-1966
> Project: Struts 2
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 2.0.6, 2.0.7, 2.0.8
> Environment: struts2.0.6
> eclipse3.2 wtp
> tomcat 5.5
> Reporter: Jung Kwang Sun
> Assignee: David Evans
> Fix For: 2.0.10
>
>
> I tested the struts.configuration.files properties for special cases, and found a kind of bug.
> With the struts-showcases-2.0.6, I remove the <include file="struts-tags.xml"/> line in the struts.xml.
> And add the following line in the struts.properties :
> struts.configuration.files=struts-default.xml,struts-plugin.xml,struts.xml,struts-tags.xml
> Then when I accessed the tags-related action, exception happened(no action or result exception)...
> Is this a incorrect attempt? or bug?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-1966) struts.configuration.files doesn't work,
or work incorrectly
Posted by "Ted Husted (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-1966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Husted updated WW-1966:
---------------------------
Fix Version/s: Future
Setting Fix Version to "future" for issues without a set fix version.
> struts.configuration.files doesn't work, or work incorrectly
> ------------------------------------------------------------
>
> Key: WW-1966
> URL: https://issues.apache.org/struts/browse/WW-1966
> Project: Struts 2
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 2.0.6
> Environment: struts2.0.6
> eclipse3.2 wtp
> tomcat 5.5
> Reporter: Jung Kwang Sun
> Assignee: David Evans
> Fix For: Future
>
>
> I tested the struts.configuration.files properties for special cases, and found a kind of bug.
> With the struts-showcases-2.0.6, I remove the <include file="struts-tags.xml"/> line in the struts.xml.
> And add the following line in the struts.properties :
> struts.configuration.files=struts-default.xml,struts-plugin.xml,struts.xml,struts-tags.xml
> Then when I accessed the tags-related action, exception happened(no action or result exception)...
> Is this a incorrect attempt? or bug?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WW-1966) "struts.configuration.files" setting not
implemented
Posted by "Don Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-1966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Don Brown resolved WW-1966.
---------------------------
Resolution: Fixed
Assignee: Don Brown (was: James Holmes)
Closing as the 'config' init parameter certainly does work and the struts.configuration.files setting has been removed
> "struts.configuration.files" setting not implemented
> ----------------------------------------------------
>
> Key: WW-1966
> URL: https://issues.apache.org/struts/browse/WW-1966
> Project: Struts 2
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.0.10
> Environment: struts2.0.6
> eclipse3.2 wtp
> tomcat 5.5
> Reporter: Jung Kwang Sun
> Assignee: Don Brown
> Fix For: 2.1.0
>
>
> I tested the struts.configuration.files properties for special cases, and found a kind of bug.
> With the struts-showcases-2.0.6, I remove the <include file="struts-tags.xml"/> line in the struts.xml.
> And add the following line in the struts.properties :
> struts.configuration.files=struts-default.xml,struts-plugin.xml,struts.xml,struts-tags.xml
> Then when I accessed the tags-related action, exception happened(no action or result exception)...
> Is this a incorrect attempt? or bug?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-1966) "struts.configuration.files" setting not
implemented
Posted by "James Holmes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-1966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Holmes updated WW-1966:
-----------------------------
Summary: "struts.configuration.files" setting not implemented (was: "struts.configuration.files" setting does not work in application-specific struts.properties files)
> "struts.configuration.files" setting not implemented
> ----------------------------------------------------
>
> Key: WW-1966
> URL: https://issues.apache.org/struts/browse/WW-1966
> Project: Struts 2
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 2.0.6, 2.0.7, 2.0.8
> Environment: struts2.0.6
> eclipse3.2 wtp
> tomcat 5.5
> Reporter: Jung Kwang Sun
> Assignee: James Holmes
> Fix For: 2.0.10
>
>
> I tested the struts.configuration.files properties for special cases, and found a kind of bug.
> With the struts-showcases-2.0.6, I remove the <include file="struts-tags.xml"/> line in the struts.xml.
> And add the following line in the struts.properties :
> struts.configuration.files=struts-default.xml,struts-plugin.xml,struts.xml,struts-tags.xml
> Then when I accessed the tags-related action, exception happened(no action or result exception)...
> Is this a incorrect attempt? or bug?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-1966) "struts.configuration.files" setting
not implemented
Posted by "Don Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-1966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42111 ]
Don Brown commented on WW-1966:
-------------------------------
The struts.configuration.files setting is only settable in web.xml as an init param due to its use loading the other configuration files. As for switching the config order, I wouldn't recommend it without a lot of testing. I can't remember why exactly the order is the way it is, but there were reasons. If nothing else, we should mark the struts.configuration.files setting in the docs as only being settable in web.xml.
> "struts.configuration.files" setting not implemented
> ----------------------------------------------------
>
> Key: WW-1966
> URL: https://issues.apache.org/struts/browse/WW-1966
> Project: Struts 2
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.0.10
> Environment: struts2.0.6
> eclipse3.2 wtp
> tomcat 5.5
> Reporter: Jung Kwang Sun
> Assignee: James Holmes
> Fix For: 2.1.0
>
>
> I tested the struts.configuration.files properties for special cases, and found a kind of bug.
> With the struts-showcases-2.0.6, I remove the <include file="struts-tags.xml"/> line in the struts.xml.
> And add the following line in the struts.properties :
> struts.configuration.files=struts-default.xml,struts-plugin.xml,struts.xml,struts-tags.xml
> Then when I accessed the tags-related action, exception happened(no action or result exception)...
> Is this a incorrect attempt? or bug?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-1966) "struts.configuration.files" setting not
implemented
Posted by "Don Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-1966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Don Brown updated WW-1966:
--------------------------
Fix Version/s: (was: 2.0.11)
2.1.0
> "struts.configuration.files" setting not implemented
> ----------------------------------------------------
>
> Key: WW-1966
> URL: https://issues.apache.org/struts/browse/WW-1966
> Project: Struts 2
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.0.10
> Environment: struts2.0.6
> eclipse3.2 wtp
> tomcat 5.5
> Reporter: Jung Kwang Sun
> Assignee: James Holmes
> Fix For: 2.1.0
>
>
> I tested the struts.configuration.files properties for special cases, and found a kind of bug.
> With the struts-showcases-2.0.6, I remove the <include file="struts-tags.xml"/> line in the struts.xml.
> And add the following line in the struts.properties :
> struts.configuration.files=struts-default.xml,struts-plugin.xml,struts.xml,struts-tags.xml
> Then when I accessed the tags-related action, exception happened(no action or result exception)...
> Is this a incorrect attempt? or bug?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-1966) "struts.configuration.files" setting
not implemented
Posted by "Don Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-1966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42130 ]
Don Brown commented on WW-1966:
-------------------------------
Sorry, I was thinking of the 'config' init parameter. struts.configuration.files is never used and is only in default.properties as I used it at one point in the plugin transition, then switched to the 'config' parameter and forgot about it. I removed it from trunk (2.1.x).
> "struts.configuration.files" setting not implemented
> ----------------------------------------------------
>
> Key: WW-1966
> URL: https://issues.apache.org/struts/browse/WW-1966
> Project: Struts 2
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.0.10
> Environment: struts2.0.6
> eclipse3.2 wtp
> tomcat 5.5
> Reporter: Jung Kwang Sun
> Assignee: James Holmes
> Fix For: 2.1.0
>
>
> I tested the struts.configuration.files properties for special cases, and found a kind of bug.
> With the struts-showcases-2.0.6, I remove the <include file="struts-tags.xml"/> line in the struts.xml.
> And add the following line in the struts.properties :
> struts.configuration.files=struts-default.xml,struts-plugin.xml,struts.xml,struts-tags.xml
> Then when I accessed the tags-related action, exception happened(no action or result exception)...
> Is this a incorrect attempt? or bug?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.