Have a look in the WEB-INF/struts-config.xml. Look for your action element and in particluar for the validate attribute.

Regr

    <action    path="/editRegistration"
               type="org.apache.struts.webapp.example.EditRegistrationAction"
               name="registrationForm"
              scope="request"
           validate="false">
 ^^^^^^^^^^^^^^^^^^
      <forward name="success"              path="/registration.jsp"/>
    </action>


Hope this helps -- Tobias




DUPRAT Alexandre <[EMAIL PROTECTED]>

06.08.2001 16:26
Bitte antworten an struts-user

       
        An:        "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
        Kopie:        
        Thema:        RE: Antwort: Validation a form


i have this int parameter in web.xml for ActionServlet :
<init-param>
  <param-name>validate</param-name>
  <param-value>true</param-value>
</init-param>

it seem to work cause i can debug the method in visula age for java.
I enter the method but i've an error 500 as response from my web server.

-----Message d'origine-----
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Date: lundi 6 août 2001 16:14
À: [EMAIL PROTECTED]
Objet: Antwort: Validation a form



Did you enable validate="true" in struts-config.xml for that action?

Regards -- Tobias




                DUPRAT Alexandre <[EMAIL PROTECTED]>


06.08.2001 15:28
Bitte antworten an struts-user


       
       An:        "'[EMAIL PROTECTED]'"
<[EMAIL PROTECTED]>
       Kopie:        
       Thema:        Validation a form


hi,

How can i validate a form?
I tried :
public ActionErrors validate(ActionMapping mapping, HttpServletRequest req)
{
               ActionErrors errors= new ActionErrors();
               if(! getSqlQuery().startsWith("select")){
                                ActionError error = new
ActionError("error.requete");
                                errors.add("sqlQuery", error);
               }
               return errors;
}

it works when there is no error but not when i've one....
Is there somebody with an idea?

Alexandre Duprat
SOPRA. Direction France Sud. Bordeaux
[EMAIL PROTECTED]



+----------------------------------------------------------------+
| Ce courrier ainsi que les fichiers joints sont confidentiels.  |
| Si vous avez recu ce courrier par erreur, veuillez en informer |
| l'administrateur du systeme : [EMAIL PROTECTED]               |
|                          ---------                             |
| Ce message confirme que le courrier a passe le controle        |
| antivirus du relais de messagerie Internet avec succes.        |
+----------------------------------------------------------------+




+----------------------------------------------------------------+
| Ce courrier ainsi que les fichiers joints sont confidentiels. |
| Si vous avez recu ce courrier par erreur, veuillez en informer |
| l'administrateur du systeme : [EMAIL PROTECTED] |
| --------- |
| Ce message confirme que le courrier a passe le controle |
| antivirus du relais de messagerie Internet avec succes. |
+----------------------------------------------------------------+




Reply via email to