have you try to restart tomcat ?
----- Original Message -----
From: "Johan Kumps" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, February 20, 2003 10:02 PM
Subject: Validation problem
> Hi all,
>
> I have a problem displaying error messages. Why is my message not
displayed?
> Am I doing somthing wrong?
>
> Please help me, I'm loosing time with this one...
>
> Please consider following code :
>
> struts-config.xml :
>
> ...
>
> <form-bean name='someForm' type='SomeForm' />
> ...
> <action path='/something'
> type="SomeAction"
> name="someForm"
> scope="request"
> validate="true"
> input="/index.jsp"
> parameter="get">
> <forward name="success" path="/somethingelse.do" />
> </action>
> ...
>
> Form class :
>
> ...
>
> public ActionErrors validate(ActionMapping mapping, HttpServletRequest
> request) {
> ActionErrors errors = new ActionErrors();
>
> if(email == null || !checkEmail(email)) {
> errors.add(Action.ERROR_KEY, new
> ActionError("error.invalid.email"));
> }
> return errors;
> }
>
> private boolean checkEmail (String email) {
> if ((email != null) && (email.trim().length() != 0)){
> String stukNaAt = null;
> if (email.indexOf("@") != -1){
> stukNaAt = email.substring(email.indexOf("@"));
> } else {
> return false;
> }
> if ((email.indexOf("@") != email.lastIndexOf("@")) ||
> (email.indexOf(" ") != -1) ||
> (stukNaAt.indexOf(".") == -1)
> (stukNaAt.indexOf(".") == stukNaAt.length() -1) ||
> (email.trim().charAt(email.trim().length()-1) =='.') ) {
> return false;
> }
> } else {
> return false;
> }
> return true;
> }
>
> ...
>
> ApplicationResources.properties in /WEB-INF/classes
>
> error.invalid.email=Please provide us with a valid e-mail address.
>
> JSP :
>
> <html:errors/>
>
>
> ---
> This mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.454 / Virus Database: 253 - Release Date: 10/02/2003
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]