You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by ma...@apache.org on 2004/01/27 01:02:10 UTC
cvs commit: jakarta-velocity-tools/examples/struts/WEB-INF struts-config.xml
marino 2004/01/26 16:02:10
Modified: examples/struts/WEB-INF struts-config.xml
Log:
this config is now just a starting point for the struts examples app ... look into the module configs for the juice.
Revision Changes Path
1.2 +55 -241 jakarta-velocity-tools/examples/struts/WEB-INF/struts-config.xml
Index: struts-config.xml
===================================================================
RCS file: /home/cvs/jakarta-velocity-tools/examples/struts/WEB-INF/struts-config.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- struts-config.xml 5 Mar 2003 06:36:34 -0000 1.1
+++ struts-config.xml 27 Jan 2004 00:02:10 -0000 1.2
@@ -1,262 +1,76 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
- "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
- "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
-
-<!--
- This is a blank Struts configuration file based on the example application,
- with commented examples of some items.
-
- NOTE: If you have a generator tool to create the corresponding Java classes
- for you, you could include the details in the "form-bean" declarations.
- Otherwise, you would only define the "form-bean" element itself, with the
- corresponding "name" and "type" attributes, as shown here.
--->
+ "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
+ "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
-
- <!-- ========== Data Source Configuration =============================== -->
-<!--
- <data-sources>
- <data-source
- autoCommit="false"
- description="Example Data Source Configuration"
- driverClass="org.postgresql.Driver"
- maxCount="4"
- minCount="2"
- password="mypassword"
- url="jdbc:postgresql://localhost/mydatabase"
- user="myusername"
- />
- </data-sources>
--->
-
- <!-- ========== Form Bean Definitions =================================== -->
- <form-beans>
-
- <!-- Struts Example Application 1 -->
-
- <form-bean name="addressForm"
- type="examples.app1.AddressForm"/>
-
-
- <!-- Struts Example Application 2 -->
-
- <form-bean
- name="demoForm"
- type= "examples.app2.DemoForm"/>
-
-
- <!-- Struts Example Application 3 -->
-
- <form-bean
- name="logonForm"
- type= "examples.app3.LogonForm"/>
-
-
- <!-- Struts Example Application 4 -->
-
- <form-bean name="addrForm"
- type="examples.app4.AddressForm"/>
-
-
- </form-beans>
-
-
<!-- ========== Global Forward Definitions ============================== -->
<global-forwards>
- <!-- Struts Example Application 2 -->
-
- <!-- Forward to home -->
- <forward
- name="start"
- path="/home.do"/>
-
-
- <!-- Struts Example Application 3, JSP Version -->
-
- <!-- Forward to welcome -->
- <forward
- name="welcome_jsp"
- path="/welcome_jsp.do"/>
-
- <!-- Forward to logon -->
- <forward
- name="logon_jsp"
- path="/logon_jsp.do"/>
-
- <!-- Forward to logoff -->
- <forward
- name="logoff_jsp"
- path="/logoff_jsp.do"/>
-
-
- <!-- Struts Example Application 3, VM Version -->
-
- <!-- Forward to welcome -->
- <forward
- name="welcome_vm"
- path="/welcome_vm.do"/>
-
- <!-- Forward to logon -->
- <forward
- name="logon_vm"
- path="/logon_vm.do"/>
-
- <!-- Forward to logoff -->
- <forward
- name="logoff_vm"
- path="/logoff_vm.do"/>
+ <!-- Access points into the apps -->
+ <forward name="app1"
+ path="/app1/address2.do"
+ redirect="true"
+ contextRelative="true" />
+
+ <forward name="app1Jsp"
+ path="/app1/address1.do"
+ redirect="true"
+ contextRelative="true" />
+
+ <forward name="app2"
+ path="/app2/demo.do"
+ redirect="true"
+ contextRelative="true" />
+
+ <forward name="app2Src"
+ path="/app2/demoSrc.do"
+ redirect="true"
+ contextRelative="true" />
+
+ <forward name="app3"
+ path="/app3/welcome_vm.do"
+ redirect="true"
+ contextRelative="true" />
+
+ <forward name="app3Jsp"
+ path="/app3/welcome_jsp.do"
+ redirect="true"
+ contextRelative="true" />
+
+ <forward name="math"
+ path="/examples/context_tools/mathtool-demo.vm"
+ redirect="true"
+ contextRelative="true" />
+
+ <forward name="mathSrc"
+ path="examples/context_tools/mathtool-demo.txt"
+ redirect="true"
+ contextRelative="true" />
+
+ <forward name="header"
+ path="examples/request_headers/list.vm"
+ redirect="true"
+ contextRelative="true" />
+
+ <forward name="headerJsp"
+ path="examples/request_headers/list.jsp"
+ redirect="true"
+ contextRelative="true" />
</global-forwards>
-
- <!-- ========== Action Mapping Definitions ============================== -->
<action-mappings>
<!-- Struts Example Application 1, JSP Version -->
- <action path="/address1"
- type="examples.app1.AddressAction"
- name="addressForm"
- scope="request">
- <forward name="showAddress" path="/examples/struts_app1/show-address.jsp"/>
- <forward name="editAddress" path="/examples/struts_app1/edit-address.jsp"/>
- </action>
-
-
- <!-- Struts Example Application 1, Velocity Version -->
- <action path="/address2"
- type="examples.app1.AddressAction"
- name="addressForm"
- scope="request">
- <forward name="showAddress" path="/examples/struts_app1/show-address.vm"/>
- <forward name="editAddress" path="/examples/struts_app1/edit-address.vm"/>
- </action>
-
-
- <!-- Struts Example Application 2, Velocity Version -->
- <action path="/demo"
- type="examples.app2.DemoAction"
- name="demoForm"
- scope="request"
- validate="false">
- <forward name="home" path="/examples/struts_app2/tool-demo.vm"/>
- <forward name="exit" path="/examples/struts_app2/tool-demo.vm"/>
- </action>
-
-
- <!-- Struts Example Application 3, JSP Version -->
-
- <!-- Proceed to welcome page -->
- <action
- path="/welcome_jsp"
- type="examples.app3.ContinueAction">
- <forward name="continue" path="/examples/struts_app3/index.jsp"/>
- </action>
-
- <!-- Process a user logon -->
- <action
- path="/logon_jsp"
- type="examples.app3.ContinueAction"
- name="logonForm"
- scope="request"
- validate="false">
- <forward name="continue" path="/examples/struts_app3/logon.jsp"/>
- </action>
-
- <action
- path="/logonSubmit_jsp"
- type="examples.app3.LogonAction"
- name="logonForm"
- scope="request"
- validate="true"
- input="/examples/struts_app3/logon.jsp">
- <forward name="continue" path="/examples/struts_app3/index.jsp"/>
- </action>
-
- <!-- Process a user logoff -->
- <action
- path="/logoff_jsp"
- type="examples.app3.LogoffAction">
- <forward name="continue" path="/examples/struts_app3/index.jsp"/>
- </action>
-
-
- <!-- Struts Example Application 3, VM Version -->
-
- <!-- Proceed to welcome page -->
- <action
- path="/welcome_vm"
- type="examples.app3.ContinueAction">
- <forward name="continue" path="/examples/struts_app3/index.vm"/>
- </action>
-
- <!-- Process a user logon -->
- <action
- path="/logon_vm"
- type="examples.app3.ContinueAction"
- name="logonForm"
- scope="request"
- validate="false">
- <forward name="continue" path="/examples/struts_app3/logon.vm"/>
- </action>
-
- <action
- path="/logonSubmit_vm"
- type="examples.app3.LogonAction"
- name="logonForm"
- scope="request"
- validate="true"
- input="/examples/struts_app3/logon.vm">
- <forward name="continue" path="/examples/struts_app3/index.vm"/>
- </action>
-
- <!-- Process a user logoff -->
- <action
- path="/logoff_vm"
- type="examples.app3.LogoffAction">
- <forward name="continue" path="/examples/struts_app3/index.vm"/>
- </action>
-
-
- <!-- Struts Example Application 4, Velocity Version -->
- <action path="/addressdb"
- type="examples.app4.AddressAction"
- name="addrForm"
- scope="request">
- <forward name="listAddresses" path="/examples/struts_app4/list-addresses.vm"/>
- <forward name="editAddress" path="/examples/struts_app4/edit-address.vm"/>
- </action>
-
-
-
-
-
-
- <!-- The standard administrative actions available with Struts -->
- <!-- These would be either omitted or protected by security -->
- <!-- in a real application deployment -->
- <action path="/admin/addFormBean"
- type="org.apache.struts.actions.AddFormBeanAction"/>
- <action path="/admin/addForward"
- type="org.apache.struts.actions.AddForwardAction"/>
- <action path="/admin/addMapping"
- type="org.apache.struts.actions.AddMappingAction"/>
- <action path="/admin/reload"
- type="org.apache.struts.actions.ReloadAction"/>
- <action path="/admin/removeFormBean"
- type="org.apache.struts.actions.RemoveFormBeanAction"/>
- <action path="/admin/removeForward"
- type="org.apache.struts.actions.RemoveForwardAction"/>
- <action path="/admin/removeMapping"
- type="org.apache.struts.actions.RemoveMappingAction"/>
-
+ <action path="/examples"
+ type="org.apache.struts.actions.ForwardAction"
+ parameter="/doc/examples.vm"/>
</action-mappings>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org