Struts Tutorial – Sample struts-config.xml

August 23rd, 2008 by admin Leave a reply »

<?xml version=”1.0″ encoding=”ISO-8859-1″ ?>

<!DOCTYPE struts-config PUBLIC
“-//Apache Software Foundation//DTD Struts Configuration 1.2//EN”
“http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd”>

<struts-config>


<!– =====Form Bean Defination============  –>

<form-beans>

<form-bean
name=”CustomerForm”
type=”com.CustomerForm”/>
</form-beans>

<!– ============Global Exception================ –>

<global-exceptions>
</global-exceptions>

<!– ==================Global Forward============  –>

<global-forwards>

<forward
name=”welcome”
path=”/Welcome.do”/>
</global-forwards>

<!– ============Action Mapping ====================  –>

<action-mappings>

<action
path=”/Welcome”
forward=”/index.html”/>

<forward name=”testAction” path=”/pages/TestAction.jsp”/>
</action>

<action
path=”/submit”
type=”com.CustomerAction”>

<forward name=”success” path=”/success.html”/>
</action>

<action
path=”/Tiles/Example”
forward=”Tiles.Example”/>

</action-mappings>
<!– =======================Controller ==============  –>

<controller
processorClass=”org.apache.struts.action.RequestProcessor”/>

<!– ==================== Message Resources Definitions ======= –>

<message-resources parameter=”MessageResources” />

<!– ========================= Plug Ins Configuration ======== –>
</struts-config>

Related Posts with Thumbnails

Advertisement

1 comment

  1. Howdy there,just identified your web-site when i google something and wonder what web hosting do you use for your web site,the speed is more faster than my website, i really want to know it.will back to check it out,thank you!

    Like or Dislike: Thumb up 0 Thumb down 0

Leave a Reply