You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "John Lindal (JIRA)" <ji...@apache.org> on 2010/10/06 21:32:32 UTC
[jira] Created: (WW-3511) struts.devMode never set to true and
never injected
struts.devMode never set to true and never injected
---------------------------------------------------
Key: WW-3511
URL: https://issues.apache.org/jira/browse/WW-3511
Project: Struts 2
Issue Type: Bug
Components: XML Configuration
Affects Versions: 2.2.1
Reporter: John Lindal
Priority: Minor
I add this to my struts.xml file:
<constant name="struts.devMode" value="true" />
but it has no effect. In org.apache.struts2.config.BeanSelectionProvider.register(), props.getProperty(StrutsConstants.STRUTS_DEVMODE) returns "false". In ParametersInterceptor, setDevMode() is never called. When I change ParametersInterceptor.setDevMode() to not be static, it is called, but the value passed is "false".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (WW-3511) struts.devMode never set to true and
never injected
Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart reassigned WW-3511:
---------------------------------
Assignee: Lukasz Lenart
> struts.devMode never set to true and never injected
> ---------------------------------------------------
>
> Key: WW-3511
> URL: https://issues.apache.org/jira/browse/WW-3511
> Project: Struts 2
> Issue Type: Bug
> Components: XML Configuration
> Affects Versions: 2.2.1
> Reporter: John Lindal
> Assignee: Lukasz Lenart
> Priority: Minor
> Attachments: WW-3511.patch
>
>
> I add this to my struts.xml file:
> <constant name="struts.devMode" value="true" />
> but it has no effect. In org.apache.struts2.config.BeanSelectionProvider.register(), props.getProperty(StrutsConstants.STRUTS_DEVMODE) returns "false". In ParametersInterceptor, setDevMode() is never called. When I change ParametersInterceptor.setDevMode() to not be static, it is called, but the value passed is "false".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-3511) struts.devMode never set to true and
never injected
Posted by "Maurizio Cucchiara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maurizio Cucchiara updated WW-3511:
-----------------------------------
Attachment: WW-3511.patch
The attached patch solves the static injection problem.
Regarding BeanSelectionProvider issue, I guess there is something wrong on your configuration.
Ensure that struts can see your struts.xml file.
> struts.devMode never set to true and never injected
> ---------------------------------------------------
>
> Key: WW-3511
> URL: https://issues.apache.org/jira/browse/WW-3511
> Project: Struts 2
> Issue Type: Bug
> Components: XML Configuration
> Affects Versions: 2.2.1
> Reporter: John Lindal
> Priority: Minor
> Attachments: WW-3511.patch
>
>
> I add this to my struts.xml file:
> <constant name="struts.devMode" value="true" />
> but it has no effect. In org.apache.struts2.config.BeanSelectionProvider.register(), props.getProperty(StrutsConstants.STRUTS_DEVMODE) returns "false". In ParametersInterceptor, setDevMode() is never called. When I change ParametersInterceptor.setDevMode() to not be static, it is called, but the value passed is "false".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (WW-3511) struts.devMode never set to true and never
injected
Posted by "John Lindal (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Lindal closed WW-3511.
---------------------------
Resolution: Invalid
> struts.devMode never set to true and never injected
> ---------------------------------------------------
>
> Key: WW-3511
> URL: https://issues.apache.org/jira/browse/WW-3511
> Project: Struts 2
> Issue Type: Bug
> Components: XML Configuration
> Affects Versions: 2.2.1
> Reporter: John Lindal
> Assignee: Lukasz Lenart
> Priority: Minor
> Attachments: WW-3511.patch
>
>
> I add this to my struts.xml file:
> <constant name="struts.devMode" value="true" />
> but it has no effect. In org.apache.struts2.config.BeanSelectionProvider.register(), props.getProperty(StrutsConstants.STRUTS_DEVMODE) returns "false". In ParametersInterceptor, setDevMode() is never called. When I change ParametersInterceptor.setDevMode() to not be static, it is called, but the value passed is "false".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-3511) struts.devMode never set to true and
never injected
Posted by "John Lindal (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919042#action_12919042 ]
John Lindal commented on WW-3511:
---------------------------------
I put in some more debugging statements into BeanSelectionProvider, XmlConfigurationProvider,and LegacyPropertiesConfigurationProvider. I have confirmed that org/apache/struts2/default.properties is loaded after XmlConfigurationProvider loads struts.xml, and default.properties sets struts.devMode=false, so this overrides the config setting in struts.xml. As it turns out, this is caused by extensions that I built on top of Struts2. I will mark this ticket as invalid.
Thanks again for the patch!
> struts.devMode never set to true and never injected
> ---------------------------------------------------
>
> Key: WW-3511
> URL: https://issues.apache.org/jira/browse/WW-3511
> Project: Struts 2
> Issue Type: Bug
> Components: XML Configuration
> Affects Versions: 2.2.1
> Reporter: John Lindal
> Assignee: Lukasz Lenart
> Priority: Minor
> Attachments: WW-3511.patch
>
>
> I add this to my struts.xml file:
> <constant name="struts.devMode" value="true" />
> but it has no effect. In org.apache.struts2.config.BeanSelectionProvider.register(), props.getProperty(StrutsConstants.STRUTS_DEVMODE) returns "false". In ParametersInterceptor, setDevMode() is never called. When I change ParametersInterceptor.setDevMode() to not be static, it is called, but the value passed is "false".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-3511) struts.devMode never set to true and
never injected
Posted by "John Lindal (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918979#action_12918979 ]
John Lindal commented on WW-3511:
---------------------------------
Thanks for the patch. Yes, I noticed that removing static fixed the injection issue.
I'm quite sure that my struts.xml file is being loaded, because I can see all the other configuration being loaded when jboss starts up. Can you provide any pointers to where I should look to debug further?
> struts.devMode never set to true and never injected
> ---------------------------------------------------
>
> Key: WW-3511
> URL: https://issues.apache.org/jira/browse/WW-3511
> Project: Struts 2
> Issue Type: Bug
> Components: XML Configuration
> Affects Versions: 2.2.1
> Reporter: John Lindal
> Assignee: Lukasz Lenart
> Priority: Minor
> Attachments: WW-3511.patch
>
>
> I add this to my struts.xml file:
> <constant name="struts.devMode" value="true" />
> but it has no effect. In org.apache.struts2.config.BeanSelectionProvider.register(), props.getProperty(StrutsConstants.STRUTS_DEVMODE) returns "false". In ParametersInterceptor, setDevMode() is never called. When I change ParametersInterceptor.setDevMode() to not be static, it is called, but the value passed is "false".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-3511) struts.devMode never set to true and
never injected
Posted by "Maurizio Cucchiara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maurizio Cucchiara updated WW-3511:
-----------------------------------
Attachment: WW-35111-1.patch
This patch sounds better, There is no reason to keep static debug variable.
> struts.devMode never set to true and never injected
> ---------------------------------------------------
>
> Key: WW-3511
> URL: https://issues.apache.org/jira/browse/WW-3511
> Project: Struts 2
> Issue Type: Bug
> Components: XML Configuration
> Affects Versions: 2.2.1
> Reporter: John Lindal
> Assignee: Lukasz Lenart
> Priority: Minor
> Attachments: WW-3511.patch, WW-35111-1.patch
>
>
> I add this to my struts.xml file:
> <constant name="struts.devMode" value="true" />
> but it has no effect. In org.apache.struts2.config.BeanSelectionProvider.register(), props.getProperty(StrutsConstants.STRUTS_DEVMODE) returns "false". In ParametersInterceptor, setDevMode() is never called. When I change ParametersInterceptor.setDevMode() to not be static, it is called, but the value passed is "false".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.