You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by _dnyanesh <dy...@yahoo.com> on 2009/09/11 21:30:23 UTC
Re: Struts 2 dojo jsonrpc SMD problem
Specify the jason interceptor stack including default struts interceptor
stack
<interceptor-stack name="jsonStack">
<interceptor-ref name="defaultStack" />
<interceptor-ref name="json">
true
</interceptor-ref>
</interceptor-stack>
and refer this in ur action def
<action name="YourAction" method="YourMethod"
class="ActionClass">
<interceptor-ref name="jsonStack">
true
</interceptor-ref>
<result type="json">
true
</result>
</action>
Hope this helps.
@@@@@@@@@@@@@@@@@@@
RajibJana wrote:
>
> Hi,
>
> I am building a web application using Dojo 1.2.2 and struts 2.0.14 with
> spring plugin.
>
> The application is using Dojo JSONservice to call the remote action
> methods using JSONPLUGIN.
>
> The problem is that while all the interceptors ( defined in default stack)
> are called during creation of proxy object (by json rpc), no interceptors
> are called when the SMD method is called, it bypasses the interceptor
> stack. In fact, by calling SMD method, a new action instance is created,
> but none of the interceptors are called.
>
> I want the session map set by the SessionAware interceptor to get some
> information like user details etc.
>
> My question :
>
> 1) How can I force struts2/spring to consider interceptor stack while
> creating an action instance when SMD method is called?
>
> 2) Can I get the list of interceptors for a action class inside an action
> method ( SMD method)? Then I can call programmatically all the configured
> interceptors inside the SMD method.
>
> Your help is urgently needed.
>
> Regards
>
> Rajib
> Product Architect
>
--
View this message in context: http://www.nabble.com/Struts-2-dojo-jsonrpc-SMD-problem-tp21286882p25407049.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts 2 dojo jsonrpc SMD problem
Posted by Rafael Taboada <ka...@gmail.com>.
<package name="sigedgrid" extends="struts-default,json-default">
<action name="SMDAction" class="dojoAction">
<interceptor-ref name="json">
<param name="enableSMD">true</param>
<param name="excludeNullProperties">true</param>
</interceptor-ref>
<result type="json">
<param name="enableSMD">true</param>
</result>
<result name="error">error.html</result>
</action>
</package>
--
Rafael Taboada
Software Engineer
Cell : +511-992741026
"No creo en el destino pues no me gusta tener la idea de controlar mi vida"