I think that this exception occur only if you have "struts.devMode=true" in struts.properties ...


Marco Carnevale a écrit :
I am have the same question.  Does anyone have any thoughts about this?

On 8/9/07, Cameron, David <[EMAIL PROTECTED]> wrote:
Hi

I believe I'm using the redirect-action result type in the recommended
way, but I'm seeing warnings from OgnlUtil in my log4j logs. Is there a
way to avoid the warnings, short of adjusting log4j.xml? The stack
traces are very deep, so they spam the logs. But I don't really want to
exclude all warnings from OgnlUtil from my logs, because I want the
application to be as easy to maintain as possible.

The current exception is correct: there is no property 'pageName' on
'org.apache.struts2.dispatcher.ServletActionRedirectResult'. I want the
'pageName' parameter passed as a parameter to the next action. The
struts documentation at
http://struts.apache.org/2.x/docs/redirect-action-result.html suggests
that my struts config file is following the correct usage to achieve
this effect.

Here's a snippet from my struts.xml:
<action name="savePagePart5"
   class="com.zzz.actions.SaveApplicationAction">
   <result name="success" type="redirect-action">
       <param name="actionName">viewPage.action</param>
       <param name="pageName">${page.nextPage}</param>
   </result>
</action>

And an excerpt from the resulting stack trace:
[2007-08-09 12:41:40,246] WARN  [SocketListener0-0]
com.opensymphony.xwork2.util.OgnlUtil:369 - Caught OgnlException while
setting property 'pageName' on type
'org.apache.struts2.dispatcher.ServletActionRedirectResult'.
ognl.NoSuchPropertyException:
org.apache.struts2.dispatcher.ServletActionRedirectResult.pageName
       at
ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132)
       at
com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.setProperty(O
gnlValueStack.java:68)
       at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
       at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
       at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
       at ognl.SimpleNode.setValue(SimpleNode.java:246)
       at ognl.Ognl.setValue(Ognl.java:476)
       at
com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:186)
       at
com.opensymphony.xwork2.util.OgnlUtil.internalSetProperty(OgnlUtil.java:
360)
       at
com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:76)
       at
com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:49)
       at
org.apache.struts2.impl.StrutsObjectFactory.buildResult(StrutsObjectFact
ory.java:95)
       at
com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActi
onInvocation.java:195)
       at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct
ionInvocation.java:342)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:253)
       ......
       at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
       at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245
)
       at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
       at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)


Cheers!
Dave


"This e-mail and any attachments to it (the "Communication") is, unless
otherwise stated, confidential,  may contain copyright material and is for
the use only of the intended recipient. If you receive the Communication in
error, please notify the sender immediately by return e-mail, delete the
Communication and the return e-mail, and do not read, copy, retransmit or
otherwise deal with it. Any views expressed in the Communication are those
of the individual sender only, unless expressly stated to be those of
Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any
of its related entities including ANZ National Bank Limited (together
"ANZ"). ANZ does not accept liability in connection with the integrity of or
errors in the Communication, computer virus, data corruption, interference
or delay arising from or in respect of the Communication."

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--

Mike Baroukh

---
Cardiweb  - 31 Rue de Mogador Paris IXeme
06 63 57 27 22 - 01 53 21 82 63 - Jabber: [EMAIL PROTECTED]
http://www.cardiweb.com
---


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to