Hi!

I have a small HTML-Form with 3 textfields. I've implemented the validation
rules in the validate() method of the ActionForm belonging to the html form.
Unfortunately Struts isn't using the ActionForm. Why?

Here my struts-config.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts
Configuration 1.1//EN"

"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>

<struts-config>
   <form-beans>
     <form-bean name="postTestForm"
                type="com.mycompany.PostTestForm"/>
   </form-beans>

   <global-forwards type="org.apache.struts.action.ActionForward">
      <forward name="system.error" path="/WEB-INF/jsp/systemError.jsp"/>
      <forward name="default.action" path="/execute/homePageSetuo"/>
   </global-forwards>

   <action-mappings>

      <action path="/homePageSetup"
              type="com.mycompany.HomePageSetupAction"
              unknown="true">
              <forward name="homepage.success"
path="/WEB-INF/jsp/homePage.jsp"/>
      </action>

      <action path="/postTestSetup"
             type="com.mycompany.PostTestSetupAction"
             name="postTestForm"
             scope="request"
             validate="false">
             <forward name="posttest.success"
path="/WEB-INF/jsp/postTest.jsp" />

      </action>

      <action path="/postTest"
             input="/WEB-INF/jsp/postTest.jsp"
            name="postTestForm"
            scope="request"
            validate="true"
            type="com.mycompany.PostTestForm">
            <forward name="posttest.success" path="/execute/homePageSetup"/>
      </action>

   </action-mappings>
</struts-config>

The validation checks, if the fields are not empty. Even through the fields
are
being empty, when I press the Submit button the applications presents me
the entryform of the whole application. Also the URL looks pretty strange
http://localhost/myapp/execute/postTest%20name=
What doesn the %20name= mean? I think this is part of the problem.
Can someone please tell me what am I doing wrong here?

Regards
Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to