You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mark Galbreath <ma...@qat.com> on 2003/04/26 00:21:53 UTC

Validator Problem

First, my server blew its power supply Monday and I just got back online;
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 to
begin with is to validate a simple login.  Now, here's what I've been doing
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 Jakarta
site;
4.  Read the material at http://home.earthlink.net/~dwinterfeldt/index.html;
5.  Poured over the source and config files for all the webapps included
with the Struts 1.1-rc1.

Issues:
1.  Ted's chapters, though reportedly based on Struts 1.1-b2, deal with the
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 the
JSP and the Validator, and his direction to declare the <form bean> of type
"org.apache.struts.validator.ValidatorForm" in struts-config crashes the
program.

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

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 />
tags.

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!

TIA,
Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Validator Problem

Posted by Mark Galbreath <ma...@qat.com>.
Oh, I forgot...AND I read about 70 archive messages of this list, but none
appeared to be current.

-----Original Message-----
From: Mark Galbreath [mailto:mark_galbreath@qat.com] 
Sent: Friday, April 25, 2003 6:22 PM
To: struts
Subject: Validator Problem


First, my server blew its power supply Monday and I just got back online;
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 to
begin with is to validate a simple login.  Now, here's what I've been doing
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 Jakarta
site; 4.  Read the material at
http://home.earthlink.net/~dwinterfeldt/index.html;
5.  Poured over the source and config files for all the webapps included
with the Struts 1.1-rc1.

Issues:
1.  Ted's chapters, though reportedly based on Struts 1.1-b2, deal with the
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 the
JSP and the Validator, and his direction to declare the <form bean> of type
"org.apache.struts.validator.ValidatorForm" in struts-config crashes the
program.

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

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 />
tags.

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!

TIA,
Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org