You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Kishan G. Chellap Paandy" <ki...@spanservices.com> on 2009/05/29 10:04:07 UTC
Struts 2.1.6 - reload resource bundles
Hi,
I want to reload resource bundles (application resources) dynamically for i18n.
Since it is production, I can't set dev mode struts property to true.
Does setting only the struts2 property i18n.reload to true will solve my problem?
Is there is any other workaround like doing it programmatically?
Please advice.
Thank you.
Regards,
Kishan.G
Struts2 - redirectAction - ServletActionRedirectResult
Posted by "Kishan G. Chellap Paandy" <ki...@spanservices.com>.
Hi Folks,
In Struts 2.1.6, if we have a <result name="success" type="redirectAction">, for example,
<result name="showReportResult" type="redirectAction">
<param name="actionName">generateReport</param>
<param name="namespace">/genReport</param>
<param name="reportType">pie</param>
Refer to: http://struts.apache.org/2.1.6/struts2-core/apidocs/org/apache/struts2/dispatcher/ServletActionRedirectResult.html
We will get errors in the log as:
ERROR (CommonsLogger.java:27) - Unable to set parameter [reportType] in result of type [org.apache.struts2.dispatcher.ServletActionRedirectResult]
Caught OgnlException while setting property ' reportType ' on type 'org.apache.struts2.dispatcher.ServletActionRedirectResult'. - Class: ognl.ObjectPropertyAccessor
File: ObjectPropertyAccessor.java
Method: setProperty
Line: 132 - ognl/ObjectPropertyAccessor.java:132:-1
at com.opensymphony.xwork2.ognl.OgnlUtil.internalSetProperty(OgnlUtil.java:392)
at com.opensymphony.xwork2.ognl.OgnlUtil.setProperty(OgnlUtil.java:143)
at com.opensymphony.xwork2.ognl.OgnlReflectionProvider.setProperty(OgnlReflectionProvider.java:91)
at com.opensymphony.xwork2.ObjectFactory.buildResult(ObjectFactory.java:221)
at com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionInvocation.java:208)
at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:355)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265)
Note: I don't have a setProperty for reportType in GenerateReport action class. I will get the reportType param from request and use it.
Is this because, for reportType there is no setProperty in ServletActionRedirectResult or in GenerateReport action class?
Is this a bug? Or I need to have a setProperty for reportType in GenerateReport action class?
Please advice.
Thank you.
Regards,
Kishan.G
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts 2.1.6 - reload resource bundles
Posted by Musachy Barroso <mu...@gmail.com>.
I don't think it will work without without setting devMode to true.
musachy
On Thu, Jun 11, 2009 at 6:58 AM, Kishan G. Chellap
Paandy<ki...@spanservices.com> wrote:
> Hi,
>
> I need to reload resource bundles not for every request, but only when I have changed them dynamically (when the server is running), and it should reflect without restart/redeploy.
>
> Is this possible in Struts2?
>
> Please clarify.
>
> Thank you.
> Regards,
> Kishan.G
>
> Team Leader.
> www.spansystems.com
>
>
>
>
> -----Original Message-----
> From: Kishan G. Chellap Paandy [mailto:kishanchellapaandy_g@spanservices.com]
> Sent: Friday, May 29, 2009 1:34 PM
> To: Struts Users Mailing List
> Subject: Struts 2.1.6 - reload resource bundles
>
> Hi,
>
> I want to reload resource bundles (application resources) dynamically for i18n.
>
> Since it is production, I can't set dev mode struts property to true.
>
> Does setting only the struts2 property i18n.reload to true will solve my problem?
>
> Is there is any other workaround like doing it programmatically?
>
> Please advice.
>
> Thank you.
> Regards,
> Kishan.G
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Struts 2.1.6 - reload resource bundles
Posted by "Kishan G. Chellap Paandy" <ki...@spanservices.com>.
Hi,
I need to reload resource bundles not for every request, but only when I have changed them dynamically (when the server is running), and it should reflect without restart/redeploy.
Is this possible in Struts2?
Please clarify.
Thank you.
Regards,
Kishan.G
Team Leader.
www.spansystems.com
-----Original Message-----
From: Kishan G. Chellap Paandy [mailto:kishanchellapaandy_g@spanservices.com]
Sent: Friday, May 29, 2009 1:34 PM
To: Struts Users Mailing List
Subject: Struts 2.1.6 - reload resource bundles
Hi,
I want to reload resource bundles (application resources) dynamically for i18n.
Since it is production, I can't set dev mode struts property to true.
Does setting only the struts2 property i18n.reload to true will solve my problem?
Is there is any other workaround like doing it programmatically?
Please advice.
Thank you.
Regards,
Kishan.G
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org