how to write the configuration file of struts application
if any one had simple struts application please it to me
Answer Posted / surendra choudhury
//Sample struts-config.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration
1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-
config_1_1.dtd">
<struts-config> Form bean Definitions
<form-beans>
<form-bean name="CustomerForm"
type="mybank.example.CustomerForm"/>
<form-bean name="LogonForm"
type="mybank.example.LogonForm"/>
</form-beans> Global Forward Definitions
<global-forwards>
<forward name="logon" path="/logon.jsp"/>
<forward name="logoff" path="/logoff.do"/>
</global-forwards> Action Mappings
<action-mappings>
<action path="/submitDetailForm"
type="mybank.example.CustomerAction"
name="CustomerForm"
scope="request"
validate="true"
input="/CustomerDetailForm.jsp">
<forward name="success"
path="/ThankYou.jsp"
redirect=”true” />
<forward name="failure"
path="/Failure.jsp" />
</action>
<action path=”/logoff” parameter=”/logoff.jsp”
type=”org.apache.struts.action.ForwardAction” />
</action-mappings> Controller Configuration
<controller
processorClass="org.apache.struts.action.RequestProcessor" /
>
<message-resources
parameter="mybank.ApplicationResources"/>
</struts-config> Message Resource Definition
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
Explain about struts?
Do we need to pay the struts if being used in commercial purpose?
What is actionform in struts?
Describe validate() and reset() methods.
What is the use of struts config xml file?
What is the purpose of @before?
What are disadvantages of Struts?
When should be opt for struts framework?
What is front controller in struts?
What is interceptor in Struts2?
What is DynaActionForm?
Give the details of xml files used in validator framework?
What is the difference between session scope and request scope when saving formbean ?
What should be the name of xml file used for validation in struts?
Explain the difference between jakarta struts and apache struts?