Article:
  Introduction to Jakarta Struts Framework
Subject:   Null ActionForms and action names
Date:   2001-11-23 10:43:13
From:   billmil
A nice series of articles.


Two points:
1) First, it's helpful that you pointed out that an Action might receive a null ActionForm as an input parameter. In reviewing the Struts paradigms, it wasn't obvious how/if struts could "perform" an action without a form. (For example, if for your app's home page, you wanted to load a bean with data but didn't need to process any input.)


2) Second, article 3, page 3 states:

<html:form action="login.action" focus="userName">

....
"The action that is defined here, login.action, must match an ActionMapping in the struts-config.xml file."


I don't see any "login.action" in the config file. Does it automatically drop off '.action', the servlet-mapping suffix? Is it using the global forward? Or the action path?


From the config file:


<action path="/login"
type="com.oreilly.actions.LoginAction"
name="loginForm"
scope="request"
input="/Login.jsp">


thanks again.


bill milbratz

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Null ActionForms and action names
    2002-07-25 07:52:14  tlozina [View]

    It drops the .action and just looks at the prefix of the path. Remember in the web.xml file it directs all requests with suffix .action (*.action) to the ActionServlet? ActionServlet then uses the struts-config.xml to map the prefix to a mapping...