Update: struts config, new actions and views
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
103
target/struts2-scaffold-1.0.0/WEB-INF/classes/struts.xml
Normal file
103
target/struts2-scaffold-1.0.0/WEB-INF/classes/struts.xml
Normal file
@@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE struts PUBLIC
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 6.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-6.0.dtd">
|
||||
<struts>
|
||||
<!-- 开发模式 -->
|
||||
<constant name="struts.devMode" value="true" />
|
||||
<constant name="struts.enable.DynamicMethodInvocation" value="true" />
|
||||
<constant name="struts.action.extension" value="action,," />
|
||||
|
||||
<package name="default" namespace="/" extends="struts-default">
|
||||
|
||||
<!-- ========== 自定义拦截器配置 ========== -->
|
||||
<interceptors>
|
||||
<interceptor name="logging" class="com.example.struts2.interceptor.LoggingInterceptor"/>
|
||||
<interceptor name="timing" class="com.example.struts2.interceptor.TimingInterceptor"/>
|
||||
<interceptor name="rateLimit" class="com.example.struts2.interceptor.RateLimitInterceptor"/>
|
||||
<interceptor name="validation" class="com.example.struts2.interceptor.ValidationInterceptor"/>
|
||||
<interceptor name="monitor" class="com.example.struts2.interceptor.MonitorInterceptor"/>
|
||||
|
||||
<interceptor-stack name="customStack">
|
||||
<interceptor-ref name="logging"/>
|
||||
<interceptor-ref name="timing"/>
|
||||
<interceptor-ref name="monitor"/>
|
||||
<interceptor-ref name="defaultStack"/>
|
||||
</interceptor-stack>
|
||||
|
||||
<interceptor-stack name="apiStack">
|
||||
<interceptor-ref name="logging"/>
|
||||
<interceptor-ref name="rateLimit">
|
||||
<param name="maxRequestsPerMinute">100</param>
|
||||
</interceptor-ref>
|
||||
<interceptor-ref name="validation"/>
|
||||
<interceptor-ref name="timing"/>
|
||||
<interceptor-ref name="defaultStack"/>
|
||||
</interceptor-stack>
|
||||
</interceptors>
|
||||
|
||||
<!-- 默认拦截器栈 -->
|
||||
<default-interceptor-ref name="customStack"/>
|
||||
|
||||
<!-- 默认 Action -->
|
||||
<default-action-ref name="index" />
|
||||
|
||||
<!-- 全局结果 -->
|
||||
<global-results>
|
||||
<result name="rateLimitExceeded">/error-rate-limit.jsp</result>
|
||||
<result name="invalidInput">/error-invalid-input.jsp</result>
|
||||
</global-results>
|
||||
|
||||
<!-- ========== Actions ========== -->
|
||||
<action name="index">
|
||||
<result>/index.jsp</result>
|
||||
</action>
|
||||
|
||||
<action name="hello" class="com.example.struts2.HelloAction">
|
||||
<result>/hello.jsp</result>
|
||||
</action>
|
||||
|
||||
<action name="learn" class="com.example.struts2.LearnAction">
|
||||
<result>/learn.jsp</result>
|
||||
</action>
|
||||
|
||||
<action name="interceptor" class="com.example.struts2.InterceptorDemoAction">
|
||||
<result>/interceptor-demo.jsp</result>
|
||||
</action>
|
||||
|
||||
<action name="interceptor_api" class="com.example.struts2.InterceptorDemoAction">
|
||||
<interceptor-ref name="apiStack"/>
|
||||
<result>/interceptor-demo.jsp</result>
|
||||
</action>
|
||||
|
||||
<action name="calc" class="com.example.struts2.CalculatorAction">
|
||||
<result>/calculator.jsp</result>
|
||||
</action>
|
||||
|
||||
<action name="calc_execute" class="com.example.struts2.CalculatorAction" method="calculate">
|
||||
<result>/calculator.jsp</result>
|
||||
<result name="input">/calculator.jsp</result>
|
||||
</action>
|
||||
|
||||
<action name="user" class="com.example.struts2.UserFormAction" method="list">
|
||||
<result>/user-list.jsp</result>
|
||||
</action>
|
||||
|
||||
<action name="user_add" class="com.example.struts2.UserFormAction" method="add">
|
||||
<result type="redirectAction">user</result>
|
||||
</action>
|
||||
|
||||
<action name="user_edit" class="com.example.struts2.UserFormAction" method="edit">
|
||||
<result>/user-form.jsp</result>
|
||||
</action>
|
||||
|
||||
<action name="user_update" class="com.example.struts2.UserFormAction" method="update">
|
||||
<result type="redirectAction">user</result>
|
||||
</action>
|
||||
|
||||
<action name="user_delete" class="com.example.struts2.UserFormAction" method="delete">
|
||||
<result type="redirectAction">user</result>
|
||||
</action>
|
||||
|
||||
</package>
|
||||
</struts>
|
||||
BIN
target/struts2-scaffold-1.0.0/WEB-INF/lib/caffeine-2.9.3.jar
Normal file
BIN
target/struts2-scaffold-1.0.0/WEB-INF/lib/caffeine-2.9.3.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
target/struts2-scaffold-1.0.0/WEB-INF/lib/commons-io-2.15.1.jar
Normal file
BIN
target/struts2-scaffold-1.0.0/WEB-INF/lib/commons-io-2.15.1.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
target/struts2-scaffold-1.0.0/WEB-INF/lib/freemarker-2.3.32.jar
Normal file
BIN
target/struts2-scaffold-1.0.0/WEB-INF/lib/freemarker-2.3.32.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
target/struts2-scaffold-1.0.0/WEB-INF/lib/log4j-api-2.23.1.jar
Normal file
BIN
target/struts2-scaffold-1.0.0/WEB-INF/lib/log4j-api-2.23.1.jar
Normal file
Binary file not shown.
BIN
target/struts2-scaffold-1.0.0/WEB-INF/lib/ognl-3.3.4.jar
Normal file
BIN
target/struts2-scaffold-1.0.0/WEB-INF/lib/ognl-3.3.4.jar
Normal file
Binary file not shown.
BIN
target/struts2-scaffold-1.0.0/WEB-INF/lib/struts2-core-6.4.0.jar
Normal file
BIN
target/struts2-scaffold-1.0.0/WEB-INF/lib/struts2-core-6.4.0.jar
Normal file
Binary file not shown.
26
target/struts2-scaffold-1.0.0/WEB-INF/web.xml
Normal file
26
target/struts2-scaffold-1.0.0/WEB-INF/web.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
|
||||
http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
|
||||
version="4.0">
|
||||
|
||||
<display-name>Struts2 Scaffold</display-name>
|
||||
|
||||
<!-- Struts2 核心过滤器 -->
|
||||
<filter>
|
||||
<filter-name>struts2</filter-name>
|
||||
<filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class>
|
||||
</filter>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>struts2</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
<!-- 欢迎页 -->
|
||||
<welcome-file-list>
|
||||
<welcome-file>index.jsp</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
</web-app>
|
||||
Reference in New Issue
Block a user