• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts Action

 
altap teli
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i call the Action in Struts-config.xml file
eg.
the following Struts-config.xml file is try to call
getaccountinformation action then server gives me error:
No Instance of Action could be created.


<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"http://struts.apache.org/dtds/struts-config_1_2.dtd">

<struts-config>
<form-beans>
<form-bean name="loginForm" type="form.LoginForm"/>

<form-bean name="accountinformationform" dynamic="true"
type="org.apache.struts.action.DynaActionForm">
<form-property name="account" type="java.util.ArrayList"/>
</form-bean>
</form-beans>


<action-mappings>
<action
path="/login"
type="action.LoginAction"
scope="request"
name="loginForm"
validate="true"
input="/login.jsp" >
<forward name="success" path="/action/getaccountinformation" redirect="true"/>
<forward name="failure" path="/login.jsp" redirect="true"/>
</action>

<action
path="/getaccountinformation"
type="action.GetAccountInformationAction"
scope="request"
name="accountinformationform"
validate="false">
<forward name="Success" path="/account_information.jsp"/>
</action>


</action-mappings>

<message-resources parameter="LoginMessageResources.properties"/>
</struts-config>
 
Eugene Lucash
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
usually the problem is that there are
no such class as action.GetAccountInformationAction
maybe you forgot something to plumb
(I hate Struts for a lot of plumbing code needed)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic