You wouldn't want to hit the JSP first anyways ;-). I believe both of your thoughts will work but I would try the separate action mapping idea first.

David






From: Wendy Smoak <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
Subject: RE: Validator won't validate single required field
Date: Fri, 24 Jan 2003 12:57:39 -0700

> You probably forgot to say validate="false" in your action mapping for
> whatever action is initially displaying the page.

Only one action displays the page: ChooseProfileAction, mapped as:

<action path="/chooseProfile"
type="edu.asu.vpia.struts.ChooseProfileAction"
name="chooseProfileForm"
scope="request"
validate="true"
input="choose.profile">
<forward name="success" path="/viewProfile.do" />
<forward name="resolution" path="/resolveName.do" />
</action>

This hasn't been a problem until I tried to use validation. Since my JSP's
are stored under WEB-INF, I can't go directly to the JSP first and then to
the action only on submit.

So... could I duplicate the above mapping, but use a path such as
/chooseProfileInitial and turn validation off when that path is used?

The other thing I was considering is placing a token in the session and
overriding validate() [I think, haven't looked at the ValidateAction javadoc
yet] only calling super.validate() if the token is present, which it won't
be on the first access.

--
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail


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

Reply via email to