j2ee: Struts configuration example [25/27] Previous pageContentsNext page

Here is an example struts configuration file.


				
<?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">

<!--
  Default configuration file for examples application.
  Each module also has its own struts-config under: /WEB-INF/$MODULE/
  @version $Revision: 1.9 $ $Date: 2004/09/07 02:50:06 $

-->
<struts-config>
  <data-sources />
  <form-beans type="org.apache.struts.webapp.examples.CustomFormBean">
      <form-bean name="example" type="org.apache.struts.webapp.examples.CustomFormBean" >
      <set-property property="example" value="EXAMPLE" />
      </form-bean>
  </form-beans>
  <global-exceptions />
  <global-forwards type="org.apache.struts.webapp.examples.CustomActionForward">
      <!-- utilize a custom ActionForward as an example only -->
    <forward name="welcome" path="/welcome.do">
         <set-property property="example" value="EXAMPLE" />
     </forward>
   </global-forwards>
  <action-mappings type="org.apache.struts.webapp.examples.CustomActionMapping">
    <action path="/welcome" forward="/welcome.jsp" >
        <set-property property="example" value="EXAMPLE" />
    </action>
  </action-mappings>
  <message-resources parameter="MessageResources" />
</struts-config>
				
			

Previous pageContentsNext page