Re: Form validation over multiple pages - Solution Found - Weird

2003-05-31 Thread Brian McSweeney
Could anyone tell me if I am right in what I think the problem is here?

I use a web-filter for ssl. I use form-beans that have session scope
in a wizard, one of whose steps requires ssl.

However when the ssl step gets intercepted by the web filter,
the form-bean that should be in session scope seems to be
cleared/re-created.

Any ideas as to why?

Brian

- Original Message -
From: "Brian McSweeney" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, May 30, 2003 11:04 AM
Subject: Re: Form validation over multiple pages - Solution Found - Weird


> Thanks for the help on this guys. It was good to know people had
> it working.
>
> I've got it to work now. The reason it wasn't working was that for
> all secure pages I use a ssl filter which takes any request mapped like
> "/secure" and sends it over ssl.
>
> For example, if I want to send the
> info for the first jsp I send it to:
>
> 
> the weird thing is - the form object isn't staying in session scope if I
use
> the ssl filter and so the second page's validation was failing because the
> object wasn't in session scope anymore. However, once I removed the
> "secure" it works fine.
>
> Reading other threads, I think this might be to do with a redirect ( if
the
> filter is doing a re-direct, then a new http request might be getting
> created
> and thus a new form object gets created )
>
> Anyway, thanks for all the help, and if anyone knows how I could continue
> using the filter and keep the form object in session scope I'd really
> appreciate
> any ideas!
>
> Brian
>
>
> - Original Message -
> From: "Paul Curren" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, May 29, 2003 6:00 PM
> Subject: Re: Form validation over multiple pages
>
>
> > Hi there,
> > I've been doing this exact thing the last couple of days and I have it
> > working.
> > My html:hidden tags looks like -
> >
> > 
> > i.e. only difference is I don't explicitly specify the form name.
> >
> > My form is a DynaValidatorForm and a bug which i've seen from rc1 right
> > up to the May 26 nightly so far means that I need to explicity define
> > the page property on the form e.g.
> >
> > 
> >
> > Hope this helps,
> >
> > Paul C
> >
> >
> > Brian McSweeney wrote:
> >
> > >With a little further investigation I see that the page value does not
> > >get set in the validationForm using html:hidden approach as outlined
> > >below. Ie, this doen't work:
> > >
> > >
> > >
> > >When I print out the value of the page field in the action, it is still
> set
> > >to zero.
> > >
> > >How do you set the page property?
> > >
> > >Also, this seems to imply the validator is VERY shaky over multiple
> > >pages. For example, the properties on my second page are marked
> > >as required, and they don't get validated in the first action (this
seems
> > >to show that the page based validation is working), yet on the second
> > >page, the associated action tries to validate the page 1 properties!!!
> > >
> > >Arrrg!! What's going on! Has anyone got this to work?
> > >
> > >Brian
> > >
> > >
> > >- Original Message -
> > >From: "Brian McSweeney" <[EMAIL PROTECTED]>
> > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >Sent: Thursday, May 29, 2003 2:42 PM
> > >Subject: Form validation over multiple pages
> > >
> > >
> > >Hi all,
> > >
> > >I'm almost there with using the validator over several pages with a
> single
> > >form.
> > >However I'm getting a strange little error. The first page is
validating
> > >fine, and it
> > >doesn't seem to try to validate the info required on the second page -
> > >correct.
> > >However once I try to validate the second page, the javascript
validates
> > >correctly,
> > >but the server side validation returns an error saying the first page's
> > >required field
> > >needs validating.
> > >
> > >I think it might be because I'm not sure how to pass the page parameter
> to
> > >the action.
> > >I've tried using a html:hidden tag. Anyway, snippets from the jsps,
> struts
> > >config and
> > >validation.xml f

Re: Form validation over multiple pages - Solution Found - Weird

2003-05-30 Thread Brian McSweeney
Thanks for the help on this guys. It was good to know people had
it working.

I've got it to work now. The reason it wasn't working was that for
all secure pages I use a ssl filter which takes any request mapped like
"/secure" and sends it over ssl.

For example, if I want to send the
info for the first jsp I send it to:


To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, May 29, 2003 6:00 PM
Subject: Re: Form validation over multiple pages


> Hi there,
> I've been doing this exact thing the last couple of days and I have it
> working.
> My html:hidden tags looks like -
>
> 
> i.e. only difference is I don't explicitly specify the form name.
>
> My form is a DynaValidatorForm and a bug which i've seen from rc1 right
> up to the May 26 nightly so far means that I need to explicity define
> the page property on the form e.g.
>
> 
>
> Hope this helps,
>
> Paul C
>
>
> Brian McSweeney wrote:
>
> >With a little further investigation I see that the page value does not
> >get set in the validationForm using html:hidden approach as outlined
> >below. Ie, this doen't work:
> >
> >
> >
> >When I print out the value of the page field in the action, it is still
set
> >to zero.
> >
> >How do you set the page property?
> >
> >Also, this seems to imply the validator is VERY shaky over multiple
> >pages. For example, the properties on my second page are marked
> >as required, and they don't get validated in the first action (this seems
> >to show that the page based validation is working), yet on the second
> >page, the associated action tries to validate the page 1 properties!!!
> >
> >Arrrg!! What's going on! Has anyone got this to work?
> >
> >Brian
> >
> >
> >- Original Message -
> >From: "Brian McSweeney" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Sent: Thursday, May 29, 2003 2:42 PM
> >Subject: Form validation over multiple pages
> >
> >
> >Hi all,
> >
> >I'm almost there with using the validator over several pages with a
single
> >form.
> >However I'm getting a strange little error. The first page is validating
> >fine, and it
> >doesn't seem to try to validate the info required on the second page -
> >correct.
> >However once I try to validate the second page, the javascript validates
> >correctly,
> >but the server side validation returns an error saying the first page's
> >required field
> >needs validating.
> >
> >I think it might be because I'm not sure how to pass the page parameter
to
> >the action.
> >I've tried using a html:hidden tag. Anyway, snippets from the jsps,
struts
> >config and
> >validation.xml file are included below.
> >
> >If someone could help me out I'd be very grateful. Thanks very much,
> >Brian.
> >
> >
> >
> >
> >My first jsp named "validatestep1.jsp" looks like:
> >
> >
> >
> >
> >
> >
> > username
> >  
> > 
> > 
> >  
> >   
> >  
> >  
> >
> >
> >
> >My second jsp named "validatestep2.jsp" looks like
> >
> >
> >
> >
> >
> > 
> >  credit card with no spaces or dashes
> >  
> > 
> > 
> >  
> >   
> >  
> >  
> >
> >
> >
> >
> >in my struts config I have
> >
> > >  path="/secure/validateStep1"
> >  type="ValidateStep1Action"
> >  name="validateForm"
> >  scope="session"
> >  input="/validatestep1.jsp"
> >  unknown="false"
> >  validate="true"
> >>
> >   >name="success"
> >path="/validatestep2.jsp"
> >redirect="false"
> >  />
> >
> >and then
> >
> > >  path="/secure/validateStep2"
> >  type="ValidateStep2Action"
> >  name="validateForm"
> >  scope="session"
> >  input="/validatestep2.jsp"
> >  unknown="false"
> >  validate="true"
> >>
> >   >name="success"
> >path="/validated.jsp"
> >redirect="false"
> >  />
> >
> >In my validation.xml file I have
> >
> >
> >  
> >   >page="1">
> >
> >   >page="2">
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



Re: Form validation over multiple pages

2003-05-30 Thread Paul Curren
Hi there,
I've been doing this exact thing the last couple of days and I have it 
working.
My html:hidden tags looks like -


i.e. only difference is I don't explicitly specify the form name.
My form is a DynaValidatorForm and a bug which i've seen from rc1 right 
up to the May 26 nightly so far means that I need to explicity define 
the page property on the form e.g.



Hope this helps,

Paul C

Brian McSweeney wrote:

With a little further investigation I see that the page value does not
get set in the validationForm using html:hidden approach as outlined
below. Ie, this doen't work:
   

When I print out the value of the page field in the action, it is still set
to zero.
How do you set the page property?

Also, this seems to imply the validator is VERY shaky over multiple
pages. For example, the properties on my second page are marked
as required, and they don't get validated in the first action (this seems
to show that the page based validation is working), yet on the second
page, the associated action tries to validate the page 1 properties!!!
Arrrg!! What's going on! Has anyone got this to work?

Brian

- Original Message -
From: "Brian McSweeney" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, May 29, 2003 2:42 PM
Subject: Form validation over multiple pages
Hi all,

I'm almost there with using the validator over several pages with a single
form.
However I'm getting a strange little error. The first page is validating
fine, and it
doesn't seem to try to validate the info required on the second page -
correct.
However once I try to validate the second page, the javascript validates
correctly,
but the server side validation returns an error saying the first page's
required field
needs validating.
I think it might be because I'm not sure how to pass the page parameter to
the action.
I've tried using a html:hidden tag. Anyway, snippets from the jsps, struts
config and
validation.xml file are included below.
If someone could help me out I'd be very grateful. Thanks very much,
Brian.


My first jsp named "validatestep1.jsp" looks like:




   

username
 


 
  
 
 


My second jsp named "validatestep2.jsp" looks like



   


 credit card with no spaces or dashes
 


 
  
 
 


in my struts config I have

   
 
and then

   
 
In my validation.xml file I have

 
 
 


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



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


Re: Form validation over multiple pages

2003-05-30 Thread David Graham

With a little further investigation I see that the page value does not
get set in the validationForm using html:hidden approach as outlined
below. Ie, this doen't work:


When I print out the value of the page field in the action, it is still set
to zero.
How do you set the page property?

Also, this seems to imply the validator is VERY shaky over multiple
pages. For example, the properties on my second page are marked
as required, and they don't get validated in the first action (this seems
to show that the page based validation is working), yet on the second
page, the associated action tries to validate the page 1 properties!!!
I believe the server side validation validates any page <= the current page 
and the client side javascript just validates the current page.

David

Arrrg!! What's going on! Has anyone got this to work?

Brian

- Original Message -
From: "Brian McSweeney" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, May 29, 2003 2:42 PM
Subject: Form validation over multiple pages
Hi all,

I'm almost there with using the validator over several pages with a single
form.
However I'm getting a strange little error. The first page is validating
fine, and it
doesn't seem to try to validate the info required on the second page -
correct.
However once I try to validate the second page, the javascript validates
correctly,
but the server side validation returns an error saying the first page's
required field
needs validating.
I think it might be because I'm not sure how to pass the page parameter to
the action.
I've tried using a html:hidden tag. Anyway, snippets from the jsps, struts
config and
validation.xml file are included below.
If someone could help me out I'd be very grateful. Thanks very much,
Brian.


My first jsp named "validatestep1.jsp" looks like:






 username
  
 
 
  
   
  
  


My second jsp named "validatestep2.jsp" looks like





 
  credit card with no spaces or dashes
  
 
 
  
   
  
  


in my struts config I have


  
and then


  
In my validation.xml file I have

  
  
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


Re: Form validation over multiple pages

2003-05-30 Thread Brian McSweeney
With a little further investigation I see that the page value does not
get set in the validationForm using html:hidden approach as outlined
below. Ie, this doen't work:



When I print out the value of the page field in the action, it is still set
to zero.

How do you set the page property?

Also, this seems to imply the validator is VERY shaky over multiple
pages. For example, the properties on my second page are marked
as required, and they don't get validated in the first action (this seems
to show that the page based validation is working), yet on the second
page, the associated action tries to validate the page 1 properties!!!

Arrrg!! What's going on! Has anyone got this to work?

Brian


- Original Message -
From: "Brian McSweeney" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, May 29, 2003 2:42 PM
Subject: Form validation over multiple pages


Hi all,

I'm almost there with using the validator over several pages with a single
form.
However I'm getting a strange little error. The first page is validating
fine, and it
doesn't seem to try to validate the info required on the second page -
correct.
However once I try to validate the second page, the javascript validates
correctly,
but the server side validation returns an error saying the first page's
required field
needs validating.

I think it might be because I'm not sure how to pass the page parameter to
the action.
I've tried using a html:hidden tag. Anyway, snippets from the jsps, struts
config and
validation.xml file are included below.

If someone could help me out I'd be very grateful. Thanks very much,
Brian.




My first jsp named "validatestep1.jsp" looks like:






 username
  
 
 
  
   
  
  



My second jsp named "validatestep2.jsp" looks like





 
  credit card with no spaces or dashes
  
 
 
  
   
  
  




in my struts config I have


  

and then


  

In my validation.xml file I have


  
  

  



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



Form validation over multiple pages

2003-05-29 Thread Brian McSweeney
Hi all,

I'm almost there with using the validator over several pages with a single form. 
However I'm getting a strange little error. The first page is validating fine, and it 
doesn't seem to try to validate the info required on the second page - correct. 
However once I try to validate the second page, the javascript validates correctly, 
but the server side validation returns an error saying the first page's required field 
needs validating. 

I think it might be because I'm not sure how to pass the page parameter to the action. 
I've tried using a html:hidden tag. Anyway, snippets from the jsps, struts config and 
validation.xml file are included below. 

If someone could help me out I'd be very grateful. Thanks very much,
Brian.




My first jsp named "validatestep1.jsp" looks like:






 username
  
 
 
  
   
  
  



My second jsp named "validatestep2.jsp" looks like





 
  credit card with no spaces or dashes
  
 
 
  
   
  
  




in my struts config I have


  

and then


  

In my validation.xml file I have