?? struts-config.xml
字號:
<?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>
<!-- ============================================ Data Source Configuration -->
<!--
<data-sources>
<data-source type="org.apache.commons.dbcp.BasicDataSource">
<set-property
property="driverClassName"
value="org.postgresql.Driver" />
<set-property
property="url"
value="jdbc:postgresql://localhost/mydatabase" />
<set-property
property="username"
value="me" />
<set-property
property="password"
value="test" />
<set-property
property="maxActive"
value="10" />
<set-property
property="maxWait"
value="5000" />
<set-property
property="defaultAutoCommit"
value="false" />
<set-property
property="defaultReadOnly"
value="false" />
<set-property
property="validationQuery"
value="SELECT COUNT(*) FROM market" />
</data-source>
</data-sources>
-->
<!-- ================================================ Form Bean Definitions -->
<form-beans>
<!-- sample form bean descriptor for an ActionForm
<form-bean
name="inputForm"
type="app.InputForm"/>
end sample -->
<form-bean name="logonForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="username" type="java.lang.String"/>
<form-property name="password" type="java.lang.String"/>
</form-bean>
<form-bean name="WelcomeForm"
type="javawebstudio.struts_db.NetForm" />
<form-bean name="toTopiclistForm"
type="javawebstudio.struts_db.NetForm" />
<form-bean name="toboardForm"
type="javawebstudio.struts_db.NetForm" />
<form-bean name="toregistrationForm"
type="javawebstudio.struts_db.NetForm" />
<form-bean name="boardForm"
type="javawebstudio.struts_db.NetForm" />
<form-bean name="topicListForm"
type="javawebstudio.struts_db.NetForm" />
<form-bean name="registrationForm"
type="javawebstudio.struts_db.NetForm" />
<form-bean name="fileForm"
type="emptyprj.fileForm" />
</form-beans>
<!-- ========================================= Global Exception Definitions -->
<global-exceptions>
<!-- sample exception handler
<exception
key="expired.password"
type="app.ExpiredPasswordException"
path="/changePassword.jsp"/>
end sample -->
</global-exceptions>
<!-- =========================================== Global Forward Definitions -->
<global-forwards>
<!-- Default forward to "Welcome" action -->
<!-- Demonstrates using index.jsp to forward -->
<forward
name="welcome"
path="/Welcome.do"/>
</global-forwards>
<!-- =========================================== Action Mapping Definitions -->
<action-mappings>
<!-- Default "Welcome" action -->
<!-- Forwards to Welcome.jsp -->
<!-- sample input and input submit actions
<action
path="/Input"
type="org.apache.struts.actions.ForwardAction"
parameter="/pages/Input.jsp"/>
<action
path="/InputSubmit"
type="app.InputAction"
name="inputForm"
scope="request"
validate="true"
input="/pages/Input.jsp"/>
<action
path="/edit*"
type="app.Edit{1}Action"
name="inputForm"
scope="request"
validate="true"
input="/pages/Edit{1}.jsp"/>
end samples -->
<action path="/logonAction"
type="emptyprj.logonAction"
name="logonForm"
scope="request"
input="/logon.jsp">
<forward name="success" path="/index.jsp" /></action>
<action path="/logoff"
type="emptyprj.LogoffAction">
<forward name="success" path="/index.jsp"/>
</action>
<action path="/boardAction"
type="emptyprj.boardAction"
name="boardForm"
scope="request"
input="/board.jsp"
parameter="action">
<forward name="success" path="/board.jsp" /></action>
<action path="/toboardAction"
type="emptyprj.boardAction"
name="toboardForm"
scope="request"
input="/board.jsp"
parameter="action">
<forward name="success" path="/board.jsp" />
<forward name="install" path="/index.jsp" /></action>
<action path="/Welcome"
type="emptyprj.boardAction"
name="WelcomeForm"
scope="request"
input="/Welcome.jsp"
parameter="action">
<forward name="success" path="/Welcome.jsp" /></action>
<action path="/topicListAction"
type="emptyprj.topicListAction"
name="topicListForm"
scope="request"
input="/topicList.jsp"
parameter="action">
<forward name="success" path="/topicListOut.jsp" />
<forward name="topicList" path="/bbslist.jsp" />
<forward name="toinsertpage" path="/topicListInsert.jsp" />
</action>
<action path="/toTopicListAction"
type="emptyprj.topicListAction"
name="toTopiclistForm"
scope="request"
input="/topicList.jsp"
parameter="action">
<forward name="success" path="/topicListOut.jsp" />
<forward name="topicList" path="/bbslist.jsp" />
<forward name="toinsertpage" path="/topicListInsert.jsp" />
</action>
<action path="/registrationAction"
type="emptyprj.registrationAction"
name="registrationForm"
scope="request"
input="/registration.jsp"
parameter="action">
<forward name="success" path="/index.jsp" /></action>
<action path="/toregistrationAction"
type="emptyprj.registrationAction"
name="toregistrationForm"
scope="request"
input="/registration.jsp"
parameter="action">
<forward name="success" path="/index.jsp" /></action>
<action path="/fileAction"
type="emptyprj.topicListAction"
name="fileForm"
scope="request"
input="/topicListInsert.jsp"
parameter="action">
<forward name="success" path="/topicListInsert.jsp" />
</action>
</action-mappings>
<!-- ============================================= Controller Configuration -->
<controller
processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
<!-- ======================================== Message Resources Definitions -->
<message-resources parameter="MessageResources" />
<!-- =============================================== Plug Ins Configuration -->
<!-- ======================================================= Tiles plugin -->
<plug-in className="org.apache.struts.tiles.TilesPlugin" >
<!-- Path to XML definition file -->
<set-property property="definitions-config"
value="/WEB-INF/tiles-defs.xml" />
<!-- Set Module-awareness to true -->
<set-property property="moduleAware" value="true" />
</plug-in>
<!-- =================================================== Validator plugin -->
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property
property="pathnames"
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
</plug-in>
</struts-config>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -