struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Greenhill" <>
Subject RE: Validator Problem
Date Fri, 25 Apr 2003 23:11:43 GMT
Does your login page work when you provide valid info? If so, then it
appears the validator is working (i.e. not letting you in) and you've
just got a display problem.


-----Original Message-----
From: Mark Galbreath []
Sent: Friday, April 25, 2003 3:22 PM
To: struts
Subject: Validator Problem

First, my server blew its power supply Monday and I just got back
there were over 1400 emails from this list in my mailbox!

Now for my problem.

I finally got around to incorporating the commons.struts-validator (
1.0.2 )
into a rather complex Struts app I'm writing.  All I'm attempting to do
begin with is to validate a simple login.  Now, here's what I've been
all f*cking day:

1.  Read Ted's chapters on the Validator;
2.  Read Chuck's chapter on the Validator;
3.  Read the documentation (I'm being generous) and examples on the
4.  Read the material at;
5.  Poured over the source and config files for all the webapps included
with the Struts 1.1-rc1.

1.  Ted's chapters, though reportedly based on Struts 1.1-b2, deal with
struts-validator.tld, which, I believe, is no longer used based on my
reading of the source, config files, and the online examples.  Also, his
sample code is a complete mess (see, e.g., Listing 12.7).  In short, the
material is useless.

2.  Chuck does not provide any indication on the relationship between
JSP and the Validator, and his direction to declare the <form bean> of
"org.apache.struts.validator.ValidatorForm" in struts-config crashes the

3.  Neither address ActionMappings in struts-config; only the plug-in

4.  The earthlink site is a complete waste of time.

What I've got:
1.  An action form extending ValidatorForm with no validation method.
(Actually tried calling super.validate( mapping, request ) too, as Ted
suggested, but it doesn't work.)

2.  A login JSP with tests for Action.ERROR_KEY and
ActionErrors.GLOBAL_ERROR as well as individual <html:errors
property=xxx />

3.  validator-rules.xml in WEB-INF.

4.  validation.xml for my login form in WEB-INF.

5.  <plug-in> declaration in struts-config.

What I'm getting:
Nada.  Inducing errors into the form either gives a blank page or simply
refreshes login.jsp with no error messages.

Somebody puhleeze clue me!


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

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

View raw message