ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
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


1 to 1 of 1
1 to 1 of 1