struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael J. Godfrey" <>
Subject RE: validation="true"
Date Fri, 05 Apr 2002 22:06:39 GMT
	I just subscribed to this group today so I appologize for
missing the previous posts.
I do NOT understand the value of having a validate="true" at all then.
Can someone enlighten me?  I like alternative 2 (form.validate()).  And
I am now using that.
I still cant wrap my mind around having a validate="true" and firing it
on the FIRST load..its kooky.
just my 2 cents.

-----Original Message-----
From: Ady Das-O'Toole []
Sent: Friday, April 05, 2002 2:28 PM
To: Struts Users Mailing List
Subject: RE: validation="true"

Michael coincidentally enough the last few threads have addressed the
same issue. To summarize you could do one of two things:

1. Define 2 identical action-mappings in your struts-config
- Call the first one "firstVisitSomething...Action" and set
Now when a user clicks on the link to go to your page for the first time
you go here.

- The second action-mapping will have validate=true, and your form
action in your jsp will post to this action-mapping

2. The other way to do it is to set validate=false in your action
mapping, then call form.validate() in your Action object when the mode
is "submit" or some such.

-----Original Message-----
From: Michael J. Godfrey []
Sent: Friday, April 05, 2002 4:16 PM
To: Struts (E-mail)
Subject: validation="true"

	I am just starting to write a test app to learn struts.
I have a validation="true" setting in struts-config.xml.

When this is true, the validation happens when I OPEN a page.
I have validation that is checking for existance of values, etc.
For example.
A login page with loginID, and password as fields.
In the validate() I am checking for loginID == null and loginID.length()
<1 etc etc.
This is failing right out of the chute because the validation is firing
when the darn thing loads.
What am I doing wrong?
I have read the jakarta FAQ's etc stating that low budget validation
SHOULD be done in validate().

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message