Robert Morse wrote:

Have you gotten anywhere with this?
I'm seeing the exact problem, and I'm not using a DynaValidatorForm. No
errors are displayed, no exceptions thrown. It's as though the
validator just isn't getting invoked.

Some versions of the validator, I wish I understood this better, do not use the same logging routines as struts. As a result, they do not always log where you expect them to do so. This is especially a problem in WSAD 5.0. The failure to log consistently means that validator stack traces may actually not get logged. You might consider installing log4j with the root logger set to debug. Doing this will cause the validator to generate 1000s of line of output when you server starts (technically when your app deploys). This will help find offending code.

Off-hand, did you intentionally use a space in the key:
key="Required Called"
I do not think you can have a space in a key name. Or is this not a key? Make sure this value is a _key_ in your ApplicationResources file(s).

Regards, Evan

---- On Wed, 5 Feb 2003, Stuart Jameson
([EMAIL PROTECTED]) wrote:


In web xml there is the following is it

set for you?

<init-param>
<param-name>validate</param-name>
<param-value>true</param-value>
</init-param>


Is this right?  I have never set anything in web.xml.


-----Original Message-----
From: otisg [mailto:[EMAIL PROTECTED]] Sent: 04 February 2003 23:00
To: Tennent, Erik
Subject: Re: RE: Validator won't kick-in


Yes I did :)
My original email actually shows that my
'loginForm' is of type

org.apache.struts.validator.DynaValidatorForm

I am also using input="..." in the action
mapping.

Here is the action mapping in question:

<action path= "/Login"
type= "com.example.action.LoginAction"
scope= "request"
validate= "true"
name= "loginForm"
input= "/WEB-INF/shell/login.jsp">
<forward name= "success" path="/WEB-INF/shell/home.jsp"/>
<forward name= "failure" path="/WEB-INF/shell/login.jsp"/>
</action>


Thanks,
Otis



-----Original Message-----
From: otisg [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003

3:16 PM

To: [EMAIL PROTECTED]
Subject: Validator won't kick-in


Hello,

I am trying to use Commons Validator

with

Struts, but I can't get it to 'kick

in'. I

am using the CVS HEAD version of

Struts and

Taglibs, and Validator I just built

from CVS

the other day.

My Struts config has a 'loginForm'

defined as:

<form-bean name="loginForm"


type="org.apache.struts.validator.DynaValidatorForm">

<form-property

name="username"

type="java.lang.String"/>
<form-property

name="password"
type="java.lang.String"/>
</form-bean>


The 2 Validator's files are defined

properly

in Struts config via <plugin>.

IN Struts config I have /Login

action tied

to the loginForm form. I also have
validate="true" set in the action

mapping

(is this needed?).


In my JSP that contains this

loginForm I

have action=/Login in the HTML form.

Fields

are 'username' and 'password'.


My validation.xml contains:

<form name="loginForm">
<field property="username"
depends="required">
<msg name="required"
key="Required Called"

resource="false"/>

</field>
<field property="password"
depends="required">
</field>
</form>


--
Evan Schnell, Technical Lead
nVISIA, Twin Cities  "Digital Architecture and Construction"
7701 France Ave. S, Edina, MN 55435
Voice: 952.837.2577 -- Fax: 952.837.2578 -- Mobile: 612.232.5972

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to