• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts Action

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
reply
    Bookmark Topic Watch Topic
  • New Topic