martin,

i had seen the StrutsPrepareFilter API and as it says "Prepares the request
for execution by a later StrutsExecuteFilter filter instance. " . I've both
the StrutsPrepare and Execute filters configured plus the DWR servlet.

You were mentioning a working example of DWRValidator in the showcase, but i
couldn't find it.

My understanding is that when a DWR request is sent - it goes thru
StrutsPrepareFilter ,  StrutsExecuteFilter (which executes the Action
preceded by interceptor stack) , finally DWRServlet. So, by the time the
request reaches DWRServlet, it would have done the validations and the
errors would be populated.

The point i'm confused is that in DWRValidator doPost method, there's again
a call to execute the Action like :

ActionProxy proxy = actionProxyFactory.createActionProxy(inv, namespace,
mapping.getName(), mapping.getMethod(), *true*, *true*);
proxy.execute();
and this fails for some reason since valuestackfactory is null.

Thanks,
Joseph

On Fri, May 15, 2009 at 1:22 AM, Martin Gainty <mgai...@hotmail.com> wrote:

>
> StrutsPrepareFilter documentation is available at
>
> http://struts.apache.org/2.1.6/struts2-core/apidocs/org/apache/struts2/dispatcher/ng/filter/StrutsPrepareFilter.html
>
> there is a brand new feature that musachy put in svn on monday to
> specifically work-around action execute
> i would ping him to see if this made was built into latest distro
>
> Thanks,
> Martin Gainty
> ______________________________________________
> Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung/Note
> de déni et de confidentialité
> This message is confidential. If you should not be the intended receiver,
> then we ask politely to report. Each unauthorized forwarding or
> manufacturing of a copy is inadmissible. This message serves only for the
> exchange of information and has no legal binding effect. Due to the easy
> manipulation of emails we cannot take responsibility over the the contents.
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire
> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
> de ceci est interdite. Ce message sert à l'information seulement et n'aura
> pas n'importe quel effet légalement obligatoire. Étant donné que les email
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
> aucune responsabilité pour le contenu fourni.
>
>
>
>
> > Date: Thu, 14 May 2009 23:55:34 +0530
> > Subject: Re: DWRValidator not working in Struts 2.1.6
> > From: strutstwou...@gmail.com
> > To: mgai...@hotmail.com; user@struts.apache.org
>  >
> > Just wanted to make sure my email reached the full users' list. I
> > still havent been able to make any progress on this. Has anyone got
> > the DWRValidator working in Struts 2.1?
> >
> > On 4/24/09, j alex <strutstwou...@gmail.com> wrote:
> > > Martin,
> > >
> > > I want DWRServlet to handle only the Action validations, not Action
> > > execution. I'm invoking the validator.doPost() when user tabs off a
> field
> > > in
> > > order to validate the entered data.
> > >
> > > I couldn't find the example you are referring to in
> > > http://struts.apache.org/2.1.6/docs/tutorials.html . Could you please
> tell
> > > me a specific link ?
> > >
> > > Thanks
> > > s2user
> > >
> > >
> > >
> > > On Fri, Apr 24, 2009 at 7:50 PM, Martin Gainty <mgai...@hotmail.com>
> wrote:
> > >
> > >>  who handles the action execution DWRServlet or
> > >> StrutsPrepareAndExecuteFilter?
> > >>
> > >> If you want to use DWRServlet to handle action execution you are
> better
> > >> off
> > >> just using StrutsPrepareFilter to prepare the request as in this
> example
> > >>
> > >>
> > >>
> http://struts.apache.org/2.1.6/struts2-core/apidocs/org/apache/struts2/dispatcher/ng/filter/StrutsPrepareFilter.html
> > >>
> > >> web.xml entry
> > >>     <filter>
> > >>         <filter-name>struts-prepare</filter-name>
> > >>
> > >>
> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class>
> > >>         <init-param>
> > >>             <param-name>actionPackages</param-name>
> > >>
> <param-value>org.apache.struts2.showcase.person</param-value>
> > >>         </init-param>
> > >>     </filter>
> > >>
> > >> There is a very good example of StrutsPrepareFilter functionality
> working
> > >> in combination with DWRServlet in struts2-showcase tutorial located at
> > >>
> > >>
> > >>
> > >
> >
>  > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
>
> _________________________________________________________________
> Hotmail® has a new way to see what's up with your friends.
>
> http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009
>

Reply via email to