You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Richard Vowles <rv...@sew.co.nz> on 2000/07/24 03:19:33 UTC

Understanding the
I noticed from reading the user dox and the example that the form tag always
duplicates what is in the action.xml file - I know this wouldn't always need
to be the case, but surely you can derive most of the parameters for a
default form action from its URL? A simple lookup would save a lot of
typing...

Take login for example

  <!-- Process a user logon -->
  <action    path="/logon"
      actionClass="org.apache.struts.example.LogonAction"
    formAttribute="logonForm"
        formClass="org.apache.struts.example.LogonForm"
        inputForm="/logon.jsp">
    <forward name="success"    path="/mainMenu.jsp"/>
  </action>

With the login.jsp form

<struts:form action="logon.do" name="logonForm" focus="username"
               type="org.apache.struts.example.LogonForm">

The form attribute and class are duplicated. The documentation indicates no
default (based on the action.xml file) - I would have thought there would
be.

Richard