You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Th...@swisslife.ch on 2007/08/28 11:45:56 UTC

STRUTS 1.3.8 Validator ist destroying my SessionToken

Hi,
 
Im using the struts-Validator AND the transaction Token. Both work
perfectly - BUT if I use them in combination I'm in trouble...
 
If the validator detects wrong data and returns me to the input-form it
still starts the actionclass of the submit button - and its executing
isTokenValid() .
And of course it leads to the token being deleted... So if the user
corrects his errors he still cant continue to page2... 
Can I tell the Validator NOT to execute the second action-class? or can
I check somehow if the validation was successful?
 
 
 
 

Re: STRUTS 1.3.8 Validator ist destroying my SessionToken

Posted by Paul Benedict <pb...@apache.org>.
This is only possible if your input attribute species another action.

Paul

On 8/30/07, Thomas.Zygadlewicz@swisslife.ch <Th...@swisslife.ch>
wrote:
>
> Yes. Thats right.
>
> -----Ursprüngliche Nachricht-----
> Von: paulus.benedictus@gmail.com [mailto:paulus.benedictus@gmail.com] Im
> Auftrag von Paul Benedict
> Gesendet: Mittwoch, 29. August 2007 23:05
> An: Struts Users Mailing List
> Betreff: Re: STRUTS 1.3.8 Validator ist destroying my SessionToken
>
> Are you saying the execute() method is being called even when validation
> fails?
>
> On 8/29/07, Thomas.Zygadlewicz@swisslife.ch <
> Thomas.Zygadlewicz@swisslife.ch>
> wrote:
> >
> > It is true.. I guess.
> > When the Struts-Validation fails, the following action-class is still
> > executed - leading to the isTokenValid() Method being
> > Used.
> > The strange thing is : the process stops after the first action-class
> and
> > returns the validator-errors to the screen.
> >
> > I found a way to forward the request-Token to the following
> action-class.
> > So I'm able to test the token after the half-broken-validator did his
> test.
> > But it's not the way I imagined... And I bet it's not supposed to happen
> > that way.
> >
> >
> > -----Ursprüngliche Nachricht-----
> > Von: paulus.benedictus@gmail.com [mailto:paulus.benedictus@gmail.com] Im
> > Auftrag von Paul Benedict
> > Gesendet: Mittwoch, 29. August 2007 01:25
> > An: Struts Users Mailing List
> > Betreff: Re: STRUTS 1.3.8 Validator ist destroying my SessionToken
> >
> > On 8/28/07, Thomas.Zygadlewicz@swisslife.ch <
> > Thomas.Zygadlewicz@swisslife.ch>
> > wrote:
> > >
> > > If the validator detects wrong data and returns me to the input-form
> it
> > > still starts the actionclass of the submit button - and its executing
> > > isTokenValid() .
> >
> >
> >
> > This can't be true. If you're using automatic validation, the action
> will
> > not be invoked if validation fails. The only way this might seem like it
> > is
> > happening, if your input forward refers to another action.
> >
> >
> > And of course it leads to the token being deleted... So if the user
> > > corrects his errors he still cant continue to page2...
> > >
> >
> > I'd like to hear more about this.
> >
> > Paul
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

AW: STRUTS 1.3.8 Validator ist destroying my SessionToken

Posted by Th...@swisslife.ch.
Yes. Thats right.  

-----Ursprüngliche Nachricht-----
Von: paulus.benedictus@gmail.com [mailto:paulus.benedictus@gmail.com] Im Auftrag von Paul Benedict
Gesendet: Mittwoch, 29. August 2007 23:05
An: Struts Users Mailing List
Betreff: Re: STRUTS 1.3.8 Validator ist destroying my SessionToken

Are you saying the execute() method is being called even when validation
fails?

On 8/29/07, Thomas.Zygadlewicz@swisslife.ch <Th...@swisslife.ch>
wrote:
>
> It is true.. I guess.
> When the Struts-Validation fails, the following action-class is still
> executed - leading to the isTokenValid() Method being
> Used.
> The strange thing is : the process stops after the first action-class and
> returns the validator-errors to the screen.
>
> I found a way to forward the request-Token to the following action-class.
> So I'm able to test the token after the half-broken-validator did his test.
> But it's not the way I imagined... And I bet it's not supposed to happen
> that way.
>
>
> -----Ursprüngliche Nachricht-----
> Von: paulus.benedictus@gmail.com [mailto:paulus.benedictus@gmail.com] Im
> Auftrag von Paul Benedict
> Gesendet: Mittwoch, 29. August 2007 01:25
> An: Struts Users Mailing List
> Betreff: Re: STRUTS 1.3.8 Validator ist destroying my SessionToken
>
> On 8/28/07, Thomas.Zygadlewicz@swisslife.ch <
> Thomas.Zygadlewicz@swisslife.ch>
> wrote:
> >
> > If the validator detects wrong data and returns me to the input-form it
> > still starts the actionclass of the submit button - and its executing
> > isTokenValid() .
>
>
>
> This can't be true. If you're using automatic validation, the action will
> not be invoked if validation fails. The only way this might seem like it
> is
> happening, if your input forward refers to another action.
>
>
> And of course it leads to the token being deleted... So if the user
> > corrects his errors he still cant continue to page2...
> >
>
> I'd like to hear more about this.
>
> Paul
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: STRUTS 1.3.8 Validator ist destroying my SessionToken

Posted by Paul Benedict <pb...@apache.org>.
Are you saying the execute() method is being called even when validation
fails?

On 8/29/07, Thomas.Zygadlewicz@swisslife.ch <Th...@swisslife.ch>
wrote:
>
> It is true.. I guess.
> When the Struts-Validation fails, the following action-class is still
> executed - leading to the isTokenValid() Method being
> Used.
> The strange thing is : the process stops after the first action-class and
> returns the validator-errors to the screen.
>
> I found a way to forward the request-Token to the following action-class.
> So I'm able to test the token after the half-broken-validator did his test.
> But it's not the way I imagined... And I bet it's not supposed to happen
> that way.
>
>
> -----Ursprüngliche Nachricht-----
> Von: paulus.benedictus@gmail.com [mailto:paulus.benedictus@gmail.com] Im
> Auftrag von Paul Benedict
> Gesendet: Mittwoch, 29. August 2007 01:25
> An: Struts Users Mailing List
> Betreff: Re: STRUTS 1.3.8 Validator ist destroying my SessionToken
>
> On 8/28/07, Thomas.Zygadlewicz@swisslife.ch <
> Thomas.Zygadlewicz@swisslife.ch>
> wrote:
> >
> > If the validator detects wrong data and returns me to the input-form it
> > still starts the actionclass of the submit button - and its executing
> > isTokenValid() .
>
>
>
> This can't be true. If you're using automatic validation, the action will
> not be invoked if validation fails. The only way this might seem like it
> is
> happening, if your input forward refers to another action.
>
>
> And of course it leads to the token being deleted... So if the user
> > corrects his errors he still cant continue to page2...
> >
>
> I'd like to hear more about this.
>
> Paul
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

AW: STRUTS 1.3.8 Validator ist destroying my SessionToken

Posted by Th...@swisslife.ch.
It is true.. I guess.
When the Struts-Validation fails, the following action-class is still executed - leading to the isTokenValid() Method being 
Used.
The strange thing is : the process stops after the first action-class and returns the validator-errors to the screen.

I found a way to forward the request-Token to the following action-class. So I'm able to test the token after the half-broken-validator did his test.
But it's not the way I imagined... And I bet it's not supposed to happen that way.
 

-----Ursprüngliche Nachricht-----
Von: paulus.benedictus@gmail.com [mailto:paulus.benedictus@gmail.com] Im Auftrag von Paul Benedict
Gesendet: Mittwoch, 29. August 2007 01:25
An: Struts Users Mailing List
Betreff: Re: STRUTS 1.3.8 Validator ist destroying my SessionToken

On 8/28/07, Thomas.Zygadlewicz@swisslife.ch <Th...@swisslife.ch>
wrote:
>
> If the validator detects wrong data and returns me to the input-form it
> still starts the actionclass of the submit button - and its executing
> isTokenValid() .



This can't be true. If you're using automatic validation, the action will
not be invoked if validation fails. The only way this might seem like it is
happening, if your input forward refers to another action.


And of course it leads to the token being deleted... So if the user
> corrects his errors he still cant continue to page2...
>

I'd like to hear more about this.

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: STRUTS 1.3.8 Validator ist destroying my SessionToken

Posted by Paul Benedict <pb...@apache.org>.
On 8/28/07, Thomas.Zygadlewicz@swisslife.ch <Th...@swisslife.ch>
wrote:
>
> If the validator detects wrong data and returns me to the input-form it
> still starts the actionclass of the submit button - and its executing
> isTokenValid() .



This can't be true. If you're using automatic validation, the action will
not be invoked if validation fails. The only way this might seem like it is
happening, if your input forward refers to another action.


And of course it leads to the token being deleted... So if the user
> corrects his errors he still cant continue to page2...
>

I'd like to hear more about this.

Paul