Update: struts config, new actions and views
This commit is contained in:
BIN
target/classes/com/example/struts2/CalculatorAction.class
Normal file
BIN
target/classes/com/example/struts2/CalculatorAction.class
Normal file
Binary file not shown.
BIN
target/classes/com/example/struts2/HelloAction.class
Normal file
BIN
target/classes/com/example/struts2/HelloAction.class
Normal file
Binary file not shown.
BIN
target/classes/com/example/struts2/InterceptorDemoAction.class
Normal file
BIN
target/classes/com/example/struts2/InterceptorDemoAction.class
Normal file
Binary file not shown.
BIN
target/classes/com/example/struts2/LearnAction.class
Normal file
BIN
target/classes/com/example/struts2/LearnAction.class
Normal file
Binary file not shown.
BIN
target/classes/com/example/struts2/OgnlLabAction$DemoUser.class
Normal file
BIN
target/classes/com/example/struts2/OgnlLabAction$DemoUser.class
Normal file
Binary file not shown.
BIN
target/classes/com/example/struts2/OgnlLabAction.class
Normal file
BIN
target/classes/com/example/struts2/OgnlLabAction.class
Normal file
Binary file not shown.
BIN
target/classes/com/example/struts2/UserFormAction$User.class
Normal file
BIN
target/classes/com/example/struts2/UserFormAction$User.class
Normal file
Binary file not shown.
BIN
target/classes/com/example/struts2/UserFormAction.class
Normal file
BIN
target/classes/com/example/struts2/UserFormAction.class
Normal file
Binary file not shown.
BIN
target/classes/com/example/struts2/ValidationLabAction.class
Normal file
BIN
target/classes/com/example/struts2/ValidationLabAction.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
126
target/classes/struts.xml
Normal file
126
target/classes/struts.xml
Normal file
@@ -0,0 +1,126 @@
|
||||
<?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="ognl" class="com.example.struts2.OgnlLabAction">
|
||||
<result>/ognl-lab.jsp</result>
|
||||
</action>
|
||||
|
||||
<action name="ognl_bind" class="com.example.struts2.OgnlLabAction" method="bind">
|
||||
<result>/ognl-lab.jsp</result>
|
||||
</action>
|
||||
|
||||
<action name="validation" class="com.example.struts2.ValidationLabAction">
|
||||
<result>/validation-lab.jsp</result>
|
||||
</action>
|
||||
|
||||
<action name="validation_submit" class="com.example.struts2.ValidationLabAction" method="submit">
|
||||
<param name="actionName">submit</param>
|
||||
<result>/validation-lab.jsp</result>
|
||||
<result name="input">/validation-lab.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>
|
||||
<result name="input">/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">
|
||||
<param name="actionName">user_add</param>
|
||||
<result type="redirectAction">user</result>
|
||||
<result name="input">/user-form.jsp</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">
|
||||
<param name="actionName">user_update</param>
|
||||
<result type="redirectAction">user</result>
|
||||
<result name="input">/user-form.jsp</result>
|
||||
</action>
|
||||
|
||||
<action name="user_delete" class="com.example.struts2.UserFormAction" method="delete">
|
||||
<result type="redirectAction">user</result>
|
||||
</action>
|
||||
|
||||
</package>
|
||||
</struts>
|
||||
3
target/maven-archiver/pom.properties
Normal file
3
target/maven-archiver/pom.properties
Normal file
@@ -0,0 +1,3 @@
|
||||
artifactId=struts2-scaffold
|
||||
groupId=com.example
|
||||
version=1.0.0
|
||||
@@ -0,0 +1,14 @@
|
||||
com/example/struts2/interceptor/LoggingInterceptor.class
|
||||
com/example/struts2/InterceptorDemoAction.class
|
||||
com/example/struts2/CalculatorAction.class
|
||||
com/example/struts2/OgnlLabAction.class
|
||||
com/example/struts2/interceptor/RateLimitInterceptor.class
|
||||
com/example/struts2/HelloAction.class
|
||||
com/example/struts2/LearnAction.class
|
||||
com/example/struts2/interceptor/ValidationInterceptor.class
|
||||
com/example/struts2/OgnlLabAction$DemoUser.class
|
||||
com/example/struts2/UserFormAction$User.class
|
||||
com/example/struts2/interceptor/TimingInterceptor.class
|
||||
com/example/struts2/ValidationLabAction.class
|
||||
com/example/struts2/UserFormAction.class
|
||||
com/example/struts2/interceptor/MonitorInterceptor.class
|
||||
@@ -0,0 +1,10 @@
|
||||
/home/llm/Projects/struts2-scaffold/src/main/java/com/example/struts2/interceptor/ValidationInterceptor.java
|
||||
/home/llm/Projects/struts2-scaffold/src/main/java/com/example/struts2/HelloAction.java
|
||||
/home/llm/Projects/struts2-scaffold/src/main/java/com/example/struts2/interceptor/LoggingInterceptor.java
|
||||
/home/llm/Projects/struts2-scaffold/src/main/java/com/example/struts2/UserFormAction.java
|
||||
/home/llm/Projects/struts2-scaffold/src/main/java/com/example/struts2/interceptor/MonitorInterceptor.java
|
||||
/home/llm/Projects/struts2-scaffold/src/main/java/com/example/struts2/LearnAction.java
|
||||
/home/llm/Projects/struts2-scaffold/src/main/java/com/example/struts2/interceptor/TimingInterceptor.java
|
||||
/home/llm/Projects/struts2-scaffold/src/main/java/com/example/struts2/InterceptorDemoAction.java
|
||||
/home/llm/Projects/struts2-scaffold/src/main/java/com/example/struts2/CalculatorAction.java
|
||||
/home/llm/Projects/struts2-scaffold/src/main/java/com/example/struts2/interceptor/RateLimitInterceptor.java
|
||||
BIN
target/struts2-scaffold-1.0.0.war
Normal file
BIN
target/struts2-scaffold-1.0.0.war
Normal file
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.
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>
|
||||
85
target/struts2-scaffold-1.0.0/calculator.jsp
Normal file
85
target/struts2-scaffold-1.0.0/calculator.jsp
Normal file
@@ -0,0 +1,85 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>计算器 - Struts2 表单示例</title>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; max-width: 600px; margin: 50px auto; padding: 20px; }
|
||||
h1 { color: #e74c3c; }
|
||||
.form-group { margin: 15px 0; }
|
||||
label { display: inline-block; width: 100px; }
|
||||
input, select { padding: 8px; font-size: 14px; }
|
||||
button { background: #3498db; color: white; padding: 10px 20px; border: none; cursor: pointer; }
|
||||
button:hover { background: #2980b9; }
|
||||
.result { background: #2ecc71; color: white; padding: 15px; margin: 20px 0; border-radius: 5px; }
|
||||
.error { color: #e74c3c; font-size: 12px; }
|
||||
.tip { background: #f9f9f9; padding: 15px; border-left: 4px solid #3498db; margin: 20px 0; }
|
||||
.quickbar { background:#fff7e6; padding:12px; border-left:4px solid #fa8c16; margin:20px 0; border-radius:6px; }
|
||||
.quickbar button { margin-right:8px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>🔢 计算器 - Struts2 表单示例</h1>
|
||||
|
||||
<s:if test="result != null">
|
||||
<div class="result">
|
||||
计算结果: <s:property value="num1"/>
|
||||
<s:property value="operator"/>
|
||||
<s:property value="num2"/>
|
||||
= <s:property value="result"/>
|
||||
</div>
|
||||
</s:if>
|
||||
|
||||
<div class="quickbar">
|
||||
<strong>快速实验:</strong>
|
||||
<button type="button" onclick="fillExample(12, '+', 8)">填入正确示例</button>
|
||||
<button type="button" onclick="fillExample(12, '/', 0)">填入除零错误</button>
|
||||
<button type="button" onclick="fillExample('', '*', '')">填入校验错误</button>
|
||||
</div>
|
||||
|
||||
<s:form action="calc_execute" method="post">
|
||||
<div class="form-group">
|
||||
<label>数字 1:</label>
|
||||
<s:textfield name="num1" placeholder="输入第一个数字"/>
|
||||
<s:fielderror fieldName="num1" cssClass="error"/>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>运算符:</label>
|
||||
<s:select name="operator" list="{'+', '-', '*', '/'}" headerKey="" headerValue="选择运算符"/>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>数字 2:</label>
|
||||
<s:textfield name="num2" placeholder="输入第二个数字"/>
|
||||
<s:fielderror fieldName="num2" cssClass="error"/>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit">计算</button>
|
||||
</div>
|
||||
</s:form>
|
||||
|
||||
<div class="tip">
|
||||
<strong>学习点:</strong>
|
||||
<ul>
|
||||
<li><code>name</code> 属性对应 Action 的 setter 方法</li>
|
||||
<li><code><s:fielderror></code> 显示验证错误</li>
|
||||
<li><code>validate()</code> 方法进行数据验证</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<p><a href="learn">← 返回学习中心</a></p>
|
||||
|
||||
<script>
|
||||
function fillExample(n1, op, n2) {
|
||||
const fields = document.querySelectorAll('input[type="text"]');
|
||||
const select = document.querySelector('select');
|
||||
if (fields[0]) fields[0].value = n1;
|
||||
if (select) select.value = op;
|
||||
if (fields[1]) fields[1].value = n2;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
21
target/struts2-scaffold-1.0.0/error-invalid-input.jsp
Normal file
21
target/struts2-scaffold-1.0.0/error-invalid-input.jsp
Normal file
@@ -0,0 +1,21 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>参数无效</title>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; max-width: 600px; margin: 100px auto; padding: 20px; text-align: center; }
|
||||
h1 { color: #e74c3c; }
|
||||
.error-box { background: #fdeaea; border: 1px solid #e74c3c; padding: 30px; border-radius: 10px; }
|
||||
.info { color: #7f8c8d; margin-top: 20px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="error-box">
|
||||
<h1>🚫 检测到无效参数</h1>
|
||||
<p>您的请求包含可疑内容,已被拦截。</p>
|
||||
<p class="info">此页面由 ValidationInterceptor 拦截器生成</p>
|
||||
</div>
|
||||
<p><a href="learn">← 返回学习中心</a></p>
|
||||
</body>
|
||||
</html>
|
||||
21
target/struts2-scaffold-1.0.0/error-rate-limit.jsp
Normal file
21
target/struts2-scaffold-1.0.0/error-rate-limit.jsp
Normal file
@@ -0,0 +1,21 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>请求过于频繁</title>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; max-width: 600px; margin: 100px auto; padding: 20px; text-align: center; }
|
||||
h1 { color: #e74c3c; }
|
||||
.error-box { background: #fdeaea; border: 1px solid #e74c3c; padding: 30px; border-radius: 10px; }
|
||||
.info { color: #7f8c8d; margin-top: 20px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="error-box">
|
||||
<h1>⚠️ 请求过于频繁</h1>
|
||||
<p>您的请求次数超过限制,请稍后再试。</p>
|
||||
<p class="info">此页面由 RateLimitInterceptor 拦截器生成</p>
|
||||
</div>
|
||||
<p><a href="learn">← 返回学习中心</a></p>
|
||||
</body>
|
||||
</html>
|
||||
8
target/struts2-scaffold-1.0.0/hello.jsp
Normal file
8
target/struts2-scaffold-1.0.0/hello.jsp
Normal file
@@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head><title>Struts2 Scaffold</title></head>
|
||||
<body>
|
||||
<h1>${message}</h1>
|
||||
<p>Struts2 脚手架部署中...</p>
|
||||
</body>
|
||||
</html>
|
||||
33
target/struts2-scaffold-1.0.0/index.jsp
Normal file
33
target/struts2-scaffold-1.0.0/index.jsp
Normal file
@@ -0,0 +1,33 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Struts2 Scaffold</title>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; max-width: 800px; margin: 50px auto; padding: 20px; text-align: center; }
|
||||
h1 { color: #e74c3c; font-size: 2.5em; }
|
||||
.links { margin: 30px 0; }
|
||||
.links a { display: inline-block; background: #3498db; color: white; padding: 15px 30px; margin: 10px; text-decoration: none; border-radius: 5px; }
|
||||
.links a:hover { background: #2980b9; }
|
||||
.links a.learn { background: #2ecc71; }
|
||||
.links a.learn:hover { background: #27ae60; }
|
||||
.info { color: #7f8c8d; margin-top: 40px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>🚀 Struts2 Scaffold</h1>
|
||||
<p>Struts2 学习脚手架已启动!</p>
|
||||
|
||||
<div class="links">
|
||||
<a href="learn" class="learn">📚 学习中心</a>
|
||||
</div>
|
||||
|
||||
<div class="links">
|
||||
<a href="hello">Hello 示例</a>
|
||||
<a href="calc">计算器</a>
|
||||
<a href="user">用户管理</a>
|
||||
</div>
|
||||
|
||||
<p class="info">Powered by Struts2 + Jetty</p>
|
||||
</body>
|
||||
</html>
|
||||
80
target/struts2-scaffold-1.0.0/interceptor-demo.jsp
Normal file
80
target/struts2-scaffold-1.0.0/interceptor-demo.jsp
Normal file
@@ -0,0 +1,80 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>拦截器演示 - Struts2</title>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; max-width: 900px; margin: 50px auto; padding: 20px; }
|
||||
h1 { color: #e74c3c; }
|
||||
h2 { color: #3498db; border-bottom: 2px solid #3498db; padding-bottom: 10px; }
|
||||
.card { background: #f9f9f9; padding: 20px; margin: 15px 0; border-radius: 8px; }
|
||||
.card h3 { margin-top: 0; color: #2c3e50; }
|
||||
code { background: #eee; padding: 2px 6px; border-radius: 3px; }
|
||||
pre { background: #2c3e50; color: #ecf0f1; padding: 15px; border-radius: 5px; overflow-x: auto; }
|
||||
table { width: 100%; border-collapse: collapse; margin: 10px 0; }
|
||||
th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }
|
||||
th { background: #3498db; color: white; }
|
||||
.time { color: #27ae60; font-weight: bold; }
|
||||
.api-link { display: inline-block; background: #9b59b6; color: white; padding: 10px 20px;
|
||||
text-decoration: none; border-radius: 5px; margin: 5px; }
|
||||
.lab { background:#fff7e6; border-left:4px solid #fa8c16; padding:15px; border-radius:8px; margin:20px 0; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>🛡️ Struts2 拦截器演示</h1>
|
||||
|
||||
<div class="lab">
|
||||
<strong>实验观察点:</strong>
|
||||
<ul>
|
||||
<li>连续刷新页面,观察 Action 调用次数如何累积</li>
|
||||
<li>切换到“API 限流栈”,理解为什么拦截器顺序会影响结果</li>
|
||||
<li>注意执行时间显示,这就是拦截器注入到 request 的数据</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>📊 执行统计</h3>
|
||||
<p>本次请求执行时间: <span class="time"><s:property value="executionTime / 1000000.0"/> ms</span></p>
|
||||
|
||||
<h4>Action 调用统计:</h4>
|
||||
<table>
|
||||
<tr><th>Action</th><th>调用次数</th></tr>
|
||||
<s:iterator value="interceptorStats" var="entry">
|
||||
<tr>
|
||||
<td><s:property value="#entry.key"/></td>
|
||||
<td><s:property value="#entry.value"/></td>
|
||||
</tr>
|
||||
</s:iterator>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>🔗 拦截器链演示</h3>
|
||||
<p>当前使用: <code>customStack</code> (日志 + 计时 + 监控 + 默认栈)</p>
|
||||
<a class="api-link" href="interceptor_api">使用 API 限流栈</a>
|
||||
<p>API 栈包含: 日志 + 限流 + 验证 + 计时 + 默认栈</p>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>📚 拦截器执行顺序</h3>
|
||||
<pre>
|
||||
请求 → LoggingInterceptor → TimingInterceptor → MonitorInterceptor → Action
|
||||
响应 ← LoggingInterceptor ← TimingInterceptor ← MonitorInterceptor ← Result
|
||||
</pre>
|
||||
<p><strong>注意:</strong> 拦截器像洋葱一样,先进入的后退出</p>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>💡 拦截器核心概念</h3>
|
||||
<ul>
|
||||
<li><strong>Interceptor 接口:</strong> init() → intercept() → destroy()</li>
|
||||
<li><strong>intercept() 方法:</strong> 调用 invocation.invoke() 继续链</li>
|
||||
<li><strong>拦截器栈:</strong> 多个拦截器按顺序组成链</li>
|
||||
<li><strong>责任链模式:</strong> 每个拦截器决定是否继续</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<p><a href="learn">← 返回学习中心</a></p>
|
||||
</body>
|
||||
</html>
|
||||
112
target/struts2-scaffold-1.0.0/learn.jsp
Normal file
112
target/struts2-scaffold-1.0.0/learn.jsp
Normal file
@@ -0,0 +1,112 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Struts2 学习中心</title>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; max-width: 900px; margin: 50px auto; padding: 20px; }
|
||||
h1 { color: #e74c3c; }
|
||||
h2 { color: #3498db; border-bottom: 2px solid #3498db; padding-bottom: 10px; }
|
||||
.card { background: #f5f5f5; padding: 20px; border-radius: 8px; margin: 20px 0; }
|
||||
.card h3 { margin-top: 0; }
|
||||
ul { line-height: 2; }
|
||||
a { color: #3498db; text-decoration: none; }
|
||||
a:hover { text-decoration: underline; }
|
||||
.btn { display: inline-block; background: #3498db; color: white; padding: 10px 20px;
|
||||
border-radius: 5px; margin: 5px; }
|
||||
.btn:hover { text-decoration: none; background: #2980b9; }
|
||||
.btn-green { background: #27ae60; }
|
||||
.btn-purple { background: #9b59b6; }
|
||||
code { background: #eee; padding: 2px 6px; border-radius: 3px; }
|
||||
.lab { background:#fff7e6; border-left:4px solid #fa8c16; padding:15px; border-radius:8px; margin:20px 0; }
|
||||
.quick-tools { display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>🎓 Struts2 学习中心</h1>
|
||||
|
||||
<div class="lab">
|
||||
<strong>🧪 学习任务卡</strong>
|
||||
<ul>
|
||||
<li>先点“拦截器演示”,观察执行统计和链路顺序</li>
|
||||
<li>再点“计算器”,故意输入非法值体验 Struts2 验证</li>
|
||||
<li>最后点“用户管理”,理解 Action + JSP + 表单提交流程</li>
|
||||
</ul>
|
||||
<div class="quick-tools">
|
||||
<a class="btn btn-purple" href="interceptor">直接去拦截器实验</a>
|
||||
<a class="btn" href="calc">直接去计算器实验</a>
|
||||
<a class="btn btn-green" href="user">直接去用户管理实验</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>🛡️ 拦截器 (核心特性)</h3>
|
||||
<p>拦截器是 Struts2 最强大的特性之一,基于责任链模式实现 AOP。</p>
|
||||
<div>
|
||||
<a class="btn btn-purple" href="interceptor">拦截器演示</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="interceptor">LoggingInterceptor</a> - 日志记录</li>
|
||||
<li><a href="interceptor">TimingInterceptor</a> - 性能计时</li>
|
||||
<li><a href="interceptor">RateLimitInterceptor</a> - IP 限流</li>
|
||||
<li><a href="interceptor">ValidationInterceptor</a> - 参数验证</li>
|
||||
<li><a href="interceptor">MonitorInterceptor</a> - 状态监控</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>📝 基础示例</h3>
|
||||
<div>
|
||||
<a class="btn" href="hello">Hello World</a>
|
||||
<a class="btn" href="calc">计算器</a>
|
||||
<a class="btn btn-green" href="user">用户管理</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>📚 学习路径</h2>
|
||||
|
||||
<div class="card">
|
||||
<h3>1. MVC 架构</h3>
|
||||
<ul>
|
||||
<li><strong>Model:</strong> Action 类 + JavaBean</li>
|
||||
<li><strong>View:</strong> JSP + Struts 标签库</li>
|
||||
<li><strong>Controller:</strong> StrutsPrepareAndExecuteFilter</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>2. 拦截器机制</h3>
|
||||
<ul>
|
||||
<li><code>Interceptor</code> 接口: init() → intercept() → destroy()</li>
|
||||
<li><code>interceptor-stack</code>: 组合多个拦截器</li>
|
||||
<li>执行顺序: 责任链模式(先入后出)</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>3. OGNL 表达式</h3>
|
||||
<ul>
|
||||
<li><code><s:property value="name"/></code> - 输出属性</li>
|
||||
<li><code><s:iterator value="list"></code> - 遍历集合</li>
|
||||
<li><code>#request.key</code> - 访问 request</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>4. 项目结构</h3>
|
||||
<pre>
|
||||
├── src/main/java/com/example/struts2/
|
||||
│ ├── action/ # Action 类
|
||||
│ └── interceptor/ # 自定义拦截器
|
||||
├── src/main/resources/
|
||||
│ └── struts.xml # 核心配置
|
||||
└── src/main/webapp/
|
||||
├── WEB-INF/web.xml # Servlet 配置
|
||||
└── *.jsp # 视图页面
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p><a href="/">← 返回首页</a></p>
|
||||
</body>
|
||||
</html>
|
||||
43
target/struts2-scaffold-1.0.0/user-form.jsp
Normal file
43
target/struts2-scaffold-1.0.0/user-form.jsp
Normal file
@@ -0,0 +1,43 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>用户表单 - Struts2</title>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; max-width: 500px; margin: 50px auto; padding: 20px; }
|
||||
h1 { color: #e74c3c; }
|
||||
.form-group { margin: 15px 0; }
|
||||
label { display: block; margin-bottom: 5px; font-weight: bold; }
|
||||
input { width: 100%; padding: 10px; font-size: 14px; box-sizing: border-box; }
|
||||
button { background: #3498db; color: white; padding: 12px 24px; border: none; cursor: pointer; margin-top: 10px; }
|
||||
button:hover { background: #2980b9; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1><s:if test="user.id == null">添加用户</s:if><s:else>编辑用户</s:else></h1>
|
||||
|
||||
<s:form action="%{user.id == null ? 'user_add' : 'user_update'}" method="post">
|
||||
<s:hidden name="user.id"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label>姓名:</label>
|
||||
<s:textfield name="user.name" placeholder="请输入姓名"/>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>邮箱:</label>
|
||||
<s:textfield name="user.email" placeholder="请输入邮箱"/>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>年龄:</label>
|
||||
<s:textfield name="user.age" placeholder="请输入年龄"/>
|
||||
</div>
|
||||
|
||||
<button type="submit">保存</button>
|
||||
</s:form>
|
||||
|
||||
<p><a href="user">← 返回用户列表</a></p>
|
||||
</body>
|
||||
</html>
|
||||
59
target/struts2-scaffold-1.0.0/user-list.jsp
Normal file
59
target/struts2-scaffold-1.0.0/user-list.jsp
Normal file
@@ -0,0 +1,59 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>用户管理 - Struts2 CRUD 示例</title>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; max-width: 800px; margin: 50px auto; padding: 20px; }
|
||||
h1 { color: #e74c3c; }
|
||||
table { width: 100%; border-collapse: collapse; margin: 20px 0; }
|
||||
th, td { border: 1px solid #ddd; padding: 12px; text-align: left; }
|
||||
th { background: #3498db; color: white; }
|
||||
tr:nth-child(even) { background: #f9f9f9; }
|
||||
.btn { padding: 5px 10px; text-decoration: none; border-radius: 3px; margin-right: 5px; }
|
||||
.btn-edit { background: #f39c12; color: white; }
|
||||
.btn-delete { background: #e74c3c; color: white; }
|
||||
.btn-add { background: #2ecc71; color: white; padding: 10px 20px; }
|
||||
.tip { background: #f9f9f9; padding: 15px; border-left: 4px solid #3498db; margin: 20px 0; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>👥 用户管理 - Struts2 CRUD 示例</h1>
|
||||
|
||||
<p><a class="btn btn-add" href="user_edit">+ 添加用户</a></p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>姓名</th>
|
||||
<th>邮箱</th>
|
||||
<th>年龄</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
<s:iterator value="userList" var="u">
|
||||
<tr>
|
||||
<td><s:property value="#u.id"/></td>
|
||||
<td><s:property value="#u.name"/></td>
|
||||
<td><s:property value="#u.email"/></td>
|
||||
<td><s:property value="#u.age"/></td>
|
||||
<td>
|
||||
<a class="btn btn-edit" href="user_edit?id=<s:property value='#u.id'/>">编辑</a>
|
||||
<a class="btn btn-delete" href="user_delete?id=<s:property value='#u.id'/>" onclick="return confirm('确定删除?')">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
</s:iterator>
|
||||
</table>
|
||||
|
||||
<div class="tip">
|
||||
<strong>学习点:</strong>
|
||||
<ul>
|
||||
<li><code><s:iterator></code> 遍历集合</li>
|
||||
<li><code>redirectAction</code> 结果类型实现 PRG 模式</li>
|
||||
<li>动态方法调用处理不同操作</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<p><a href="learn">← 返回学习中心</a></p>
|
||||
</body>
|
||||
</html>
|
||||
BIN
target/tmp/jsp/org/apache/jsp/calculator_jsp.class
Normal file
BIN
target/tmp/jsp/org/apache/jsp/calculator_jsp.class
Normal file
Binary file not shown.
579
target/tmp/jsp/org/apache/jsp/calculator_jsp.java
Normal file
579
target/tmp/jsp/org/apache/jsp/calculator_jsp.java
Normal file
@@ -0,0 +1,579 @@
|
||||
/*
|
||||
* Generated by the Jasper component of Apache Tomcat
|
||||
* Version: jetty/9.4.54.v20240208
|
||||
* Generated at: 2026-03-12 22:22:00 UTC
|
||||
* Note: The last modified time of this file was set to
|
||||
* the last modified time of the source file after
|
||||
* generation to assist with modification tracking.
|
||||
*/
|
||||
package org.apache.jsp;
|
||||
|
||||
import javax.servlet.*;
|
||||
import javax.servlet.http.*;
|
||||
import javax.servlet.jsp.*;
|
||||
|
||||
public final class calculator_jsp extends org.apache.jasper.runtime.HttpJspBase
|
||||
implements org.apache.jasper.runtime.JspSourceDependent,
|
||||
org.apache.jasper.runtime.JspSourceImports {
|
||||
|
||||
private static final javax.servlet.jsp.JspFactory _jspxFactory =
|
||||
javax.servlet.jsp.JspFactory.getDefaultFactory();
|
||||
|
||||
private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;
|
||||
|
||||
static {
|
||||
_jspx_dependants = new java.util.HashMap<java.lang.String,java.lang.Long>(2);
|
||||
_jspx_dependants.put("file:/home/llm/.m2/repository/org/apache/struts/struts2-core/6.4.0/struts2-core-6.4.0.jar", Long.valueOf(1772603570859L));
|
||||
_jspx_dependants.put("jar:file:/home/llm/.m2/repository/org/apache/struts/struts2-core/6.4.0/struts2-core-6.4.0.jar!/META-INF/struts-tags.tld", Long.valueOf(1712452520000L));
|
||||
}
|
||||
|
||||
private static final java.util.Set<java.lang.String> _jspx_imports_packages;
|
||||
|
||||
private static final java.util.Set<java.lang.String> _jspx_imports_classes;
|
||||
|
||||
static {
|
||||
_jspx_imports_packages = new java.util.HashSet<>();
|
||||
_jspx_imports_packages.add("javax.servlet");
|
||||
_jspx_imports_packages.add("javax.servlet.http");
|
||||
_jspx_imports_packages.add("javax.servlet.jsp");
|
||||
_jspx_imports_classes = null;
|
||||
}
|
||||
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fif_0026_005ftest;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fform_0026_005fmethod_005faction;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005fnobody;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssClass_005fnobody;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fselect_0026_005fname_005flist_005fheaderValue_005fheaderKey_005fnobody;
|
||||
|
||||
private volatile javax.el.ExpressionFactory _el_expressionfactory;
|
||||
private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;
|
||||
|
||||
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
|
||||
return _jspx_dependants;
|
||||
}
|
||||
|
||||
public java.util.Set<java.lang.String> getPackageImports() {
|
||||
return _jspx_imports_packages;
|
||||
}
|
||||
|
||||
public java.util.Set<java.lang.String> getClassImports() {
|
||||
return _jspx_imports_classes;
|
||||
}
|
||||
|
||||
public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
|
||||
if (_el_expressionfactory == null) {
|
||||
synchronized (this) {
|
||||
if (_el_expressionfactory == null) {
|
||||
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
return _el_expressionfactory;
|
||||
}
|
||||
|
||||
public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
|
||||
if (_jsp_instancemanager == null) {
|
||||
synchronized (this) {
|
||||
if (_jsp_instancemanager == null) {
|
||||
_jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
|
||||
}
|
||||
}
|
||||
}
|
||||
return _jsp_instancemanager;
|
||||
}
|
||||
|
||||
public void _jspInit() {
|
||||
_005fjspx_005ftagPool_005fs_005fif_0026_005ftest = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005fform_0026_005fmethod_005faction = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssClass_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005fselect_0026_005fname_005flist_005fheaderValue_005fheaderKey_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
}
|
||||
|
||||
public void _jspDestroy() {
|
||||
_005fjspx_005ftagPool_005fs_005fif_0026_005ftest.release();
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.release();
|
||||
_005fjspx_005ftagPool_005fs_005fform_0026_005fmethod_005faction.release();
|
||||
_005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005fnobody.release();
|
||||
_005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssClass_005fnobody.release();
|
||||
_005fjspx_005ftagPool_005fs_005fselect_0026_005fname_005flist_005fheaderValue_005fheaderKey_005fnobody.release();
|
||||
}
|
||||
|
||||
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
|
||||
throws java.io.IOException, javax.servlet.ServletException {
|
||||
|
||||
final java.lang.String _jspx_method = request.getMethod();
|
||||
if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method) && !javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
|
||||
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET, POST or HEAD. Jasper also permits OPTIONS");
|
||||
return;
|
||||
}
|
||||
|
||||
final javax.servlet.jsp.PageContext pageContext;
|
||||
javax.servlet.http.HttpSession session = null;
|
||||
final javax.servlet.ServletContext application;
|
||||
final javax.servlet.ServletConfig config;
|
||||
javax.servlet.jsp.JspWriter out = null;
|
||||
final java.lang.Object page = this;
|
||||
javax.servlet.jsp.JspWriter _jspx_out = null;
|
||||
javax.servlet.jsp.PageContext _jspx_page_context = null;
|
||||
|
||||
|
||||
try {
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
pageContext = _jspxFactory.getPageContext(this, request, response,
|
||||
null, true, 8192, true);
|
||||
_jspx_page_context = pageContext;
|
||||
application = pageContext.getServletContext();
|
||||
config = pageContext.getServletConfig();
|
||||
session = pageContext.getSession();
|
||||
out = pageContext.getOut();
|
||||
_jspx_out = out;
|
||||
|
||||
out.write("\n");
|
||||
out.write("\n");
|
||||
out.write("<!DOCTYPE html>\n");
|
||||
out.write("<html>\n");
|
||||
out.write("<head>\n");
|
||||
out.write(" <meta charset=\"UTF-8\">\n");
|
||||
out.write(" <title>计算器 - Struts2 表单示例</title>\n");
|
||||
out.write(" <style>\n");
|
||||
out.write(" body { font-family: Arial, sans-serif; max-width: 600px; margin: 50px auto; padding: 20px; }\n");
|
||||
out.write(" h1 { color: #e74c3c; }\n");
|
||||
out.write(" .form-group { margin: 15px 0; }\n");
|
||||
out.write(" label { display: inline-block; width: 100px; }\n");
|
||||
out.write(" input, select { padding: 8px; font-size: 14px; }\n");
|
||||
out.write(" button { background: #3498db; color: white; padding: 10px 20px; border: none; cursor: pointer; }\n");
|
||||
out.write(" button:hover { background: #2980b9; }\n");
|
||||
out.write(" .result { background: #2ecc71; color: white; padding: 15px; margin: 20px 0; border-radius: 5px; }\n");
|
||||
out.write(" .error { color: #e74c3c; font-size: 12px; }\n");
|
||||
out.write(" .tip { background: #f9f9f9; padding: 15px; border-left: 4px solid #3498db; margin: 20px 0; }\n");
|
||||
out.write(" .quickbar { background:#fff7e6; padding:12px; border-left:4px solid #fa8c16; margin:20px 0; border-radius:6px; }\n");
|
||||
out.write(" .quickbar button { margin-right:8px; }\n");
|
||||
out.write(" </style>\n");
|
||||
out.write("</head>\n");
|
||||
out.write("<body>\n");
|
||||
out.write(" <h1>🔢 计算器 - Struts2 表单示例</h1>\n");
|
||||
out.write(" \n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005fif_005f0(_jspx_page_context))
|
||||
return;
|
||||
out.write("\n");
|
||||
out.write(" \n");
|
||||
out.write(" <div class=\"quickbar\">\n");
|
||||
out.write(" <strong>快速实验:</strong>\n");
|
||||
out.write(" <button type=\"button\" onclick=\"fillExample(12, '+', 8)\">填入正确示例</button>\n");
|
||||
out.write(" <button type=\"button\" onclick=\"fillExample(12, '/', 0)\">填入除零错误</button>\n");
|
||||
out.write(" <button type=\"button\" onclick=\"fillExample('', '*', '')\">填入校验错误</button>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005fform_005f0(_jspx_page_context))
|
||||
return;
|
||||
out.write("\n");
|
||||
out.write(" \n");
|
||||
out.write(" <div class=\"tip\">\n");
|
||||
out.write(" <strong>学习点:</strong>\n");
|
||||
out.write(" <ul>\n");
|
||||
out.write(" <li><code>name</code> 属性对应 Action 的 setter 方法</li>\n");
|
||||
out.write(" <li><code><s:fielderror></code> 显示验证错误</li>\n");
|
||||
out.write(" <li><code>validate()</code> 方法进行数据验证</li>\n");
|
||||
out.write(" </ul>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" \n");
|
||||
out.write(" <p><a href=\"learn\">← 返回学习中心</a></p>\n");
|
||||
out.write("\n");
|
||||
out.write(" <script>\n");
|
||||
out.write(" function fillExample(n1, op, n2) {\n");
|
||||
out.write(" const fields = document.querySelectorAll('input[type=\"text\"]');\n");
|
||||
out.write(" const select = document.querySelector('select');\n");
|
||||
out.write(" if (fields[0]) fields[0].value = n1;\n");
|
||||
out.write(" if (select) select.value = op;\n");
|
||||
out.write(" if (fields[1]) fields[1].value = n2;\n");
|
||||
out.write(" }\n");
|
||||
out.write(" </script>\n");
|
||||
out.write("</body>\n");
|
||||
out.write("</html>\n");
|
||||
} catch (java.lang.Throwable t) {
|
||||
if (!(t instanceof javax.servlet.jsp.SkipPageException)){
|
||||
out = _jspx_out;
|
||||
if (out != null && out.getBufferSize() != 0)
|
||||
try {
|
||||
if (response.isCommitted()) {
|
||||
out.flush();
|
||||
} else {
|
||||
out.clearBuffer();
|
||||
}
|
||||
} catch (java.io.IOException e) {}
|
||||
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
|
||||
else throw new ServletException(t);
|
||||
}
|
||||
} finally {
|
||||
_jspxFactory.releasePageContext(_jspx_page_context);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fif_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:if
|
||||
org.apache.struts2.views.jsp.IfTag _jspx_th_s_005fif_005f0 = (org.apache.struts2.views.jsp.IfTag) _005fjspx_005ftagPool_005fs_005fif_0026_005ftest.get(org.apache.struts2.views.jsp.IfTag.class);
|
||||
boolean _jspx_th_s_005fif_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fif_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fif_005f0.setParent(null);
|
||||
// /calculator.jsp(26,4) name = test type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fif_005f0.setTest("result != null");
|
||||
int _jspx_eval_s_005fif_005f0 = _jspx_th_s_005fif_005f0.doStartTag();
|
||||
if (_jspx_eval_s_005fif_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
|
||||
if (_jspx_eval_s_005fif_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = org.apache.jasper.runtime.JspRuntimeLibrary.startBufferedBody(_jspx_page_context, _jspx_th_s_005fif_005f0);
|
||||
}
|
||||
do {
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"result\">\n");
|
||||
out.write(" 计算结果: ");
|
||||
if (_jspx_meth_s_005fproperty_005f0(_jspx_th_s_005fif_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write(" \n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005fproperty_005f1(_jspx_th_s_005fif_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write(" \n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005fproperty_005f2(_jspx_th_s_005fif_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write(" \n");
|
||||
out.write(" = ");
|
||||
if (_jspx_meth_s_005fproperty_005f3(_jspx_th_s_005fif_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" ");
|
||||
int evalDoAfterBody = _jspx_th_s_005fif_005f0.doAfterBody();
|
||||
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
|
||||
break;
|
||||
} while (true);
|
||||
if (_jspx_eval_s_005fif_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = _jspx_page_context.popBody();
|
||||
}
|
||||
}
|
||||
if (_jspx_th_s_005fif_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fif_0026_005ftest.reuse(_jspx_th_s_005fif_005f0);
|
||||
_jspx_th_s_005fif_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fif_005f0, _jsp_getInstanceManager(), _jspx_th_s_005fif_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fif_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f0 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fif_005f0);
|
||||
// /calculator.jsp(28,18) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f0.setValue("num1");
|
||||
int _jspx_eval_s_005fproperty_005f0 = _jspx_th_s_005fproperty_005f0.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f0);
|
||||
_jspx_th_s_005fproperty_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f0, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fif_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f1 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f1_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f1.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fif_005f0);
|
||||
// /calculator.jsp(29,12) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f1.setValue("operator");
|
||||
int _jspx_eval_s_005fproperty_005f1 = _jspx_th_s_005fproperty_005f1.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f1);
|
||||
_jspx_th_s_005fproperty_005f1_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f1, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f1_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fif_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f2 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f2_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f2.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fif_005f0);
|
||||
// /calculator.jsp(30,12) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f2.setValue("num2");
|
||||
int _jspx_eval_s_005fproperty_005f2 = _jspx_th_s_005fproperty_005f2.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f2);
|
||||
_jspx_th_s_005fproperty_005f2_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f2, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f2_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f3(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fif_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f3 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f3_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f3.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f3.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fif_005f0);
|
||||
// /calculator.jsp(31,14) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f3.setValue("result");
|
||||
int _jspx_eval_s_005fproperty_005f3 = _jspx_th_s_005fproperty_005f3.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f3);
|
||||
_jspx_th_s_005fproperty_005f3_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f3, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f3_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fform_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:form
|
||||
org.apache.struts2.views.jsp.ui.FormTag _jspx_th_s_005fform_005f0 = (org.apache.struts2.views.jsp.ui.FormTag) _005fjspx_005ftagPool_005fs_005fform_0026_005fmethod_005faction.get(org.apache.struts2.views.jsp.ui.FormTag.class);
|
||||
boolean _jspx_th_s_005fform_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fform_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fform_005f0.setParent(null);
|
||||
// /calculator.jsp(42,4) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fform_005f0.setAction("calc_execute");
|
||||
// /calculator.jsp(42,4) name = method type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fform_005f0.setMethod("post");
|
||||
int _jspx_eval_s_005fform_005f0 = _jspx_th_s_005fform_005f0.doStartTag();
|
||||
if (_jspx_eval_s_005fform_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
|
||||
if (_jspx_eval_s_005fform_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = org.apache.jasper.runtime.JspRuntimeLibrary.startBufferedBody(_jspx_page_context, _jspx_th_s_005fform_005f0);
|
||||
}
|
||||
do {
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"form-group\">\n");
|
||||
out.write(" <label>数字 1:</label>\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005ftextfield_005f0(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005ffielderror_005f0(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" \n");
|
||||
out.write(" <div class=\"form-group\">\n");
|
||||
out.write(" <label>运算符:</label>\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005fselect_005f0(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" \n");
|
||||
out.write(" <div class=\"form-group\">\n");
|
||||
out.write(" <label>数字 2:</label>\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005ftextfield_005f1(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005ffielderror_005f1(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" \n");
|
||||
out.write(" <div class=\"form-group\">\n");
|
||||
out.write(" <button type=\"submit\">计算</button>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" ");
|
||||
int evalDoAfterBody = _jspx_th_s_005fform_005f0.doAfterBody();
|
||||
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
|
||||
break;
|
||||
} while (true);
|
||||
if (_jspx_eval_s_005fform_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = _jspx_page_context.popBody();
|
||||
}
|
||||
}
|
||||
if (_jspx_th_s_005fform_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fform_0026_005fmethod_005faction.reuse(_jspx_th_s_005fform_005f0);
|
||||
_jspx_th_s_005fform_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fform_005f0, _jsp_getInstanceManager(), _jspx_th_s_005fform_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005ftextfield_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:textfield
|
||||
org.apache.struts2.views.jsp.ui.TextFieldTag _jspx_th_s_005ftextfield_005f0 = (org.apache.struts2.views.jsp.ui.TextFieldTag) _005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005fnobody.get(org.apache.struts2.views.jsp.ui.TextFieldTag.class);
|
||||
boolean _jspx_th_s_005ftextfield_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005ftextfield_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005ftextfield_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /calculator.jsp(45,12) name = name type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ftextfield_005f0.setName("num1");
|
||||
// /calculator.jsp(45,12) null
|
||||
_jspx_th_s_005ftextfield_005f0.setDynamicAttribute(null, "placeholder", "输入第一个数字");
|
||||
int _jspx_eval_s_005ftextfield_005f0 = _jspx_th_s_005ftextfield_005f0.doStartTag();
|
||||
if (_jspx_th_s_005ftextfield_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005fnobody.reuse(_jspx_th_s_005ftextfield_005f0);
|
||||
_jspx_th_s_005ftextfield_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005ftextfield_005f0, _jsp_getInstanceManager(), _jspx_th_s_005ftextfield_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005ffielderror_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:fielderror
|
||||
org.apache.struts2.views.jsp.ui.FieldErrorTag _jspx_th_s_005ffielderror_005f0 = (org.apache.struts2.views.jsp.ui.FieldErrorTag) _005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssClass_005fnobody.get(org.apache.struts2.views.jsp.ui.FieldErrorTag.class);
|
||||
boolean _jspx_th_s_005ffielderror_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005ffielderror_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005ffielderror_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /calculator.jsp(46,12) name = fieldName type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ffielderror_005f0.setFieldName("num1");
|
||||
// /calculator.jsp(46,12) name = cssClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ffielderror_005f0.setCssClass("error");
|
||||
int _jspx_eval_s_005ffielderror_005f0 = _jspx_th_s_005ffielderror_005f0.doStartTag();
|
||||
if (_jspx_th_s_005ffielderror_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssClass_005fnobody.reuse(_jspx_th_s_005ffielderror_005f0);
|
||||
_jspx_th_s_005ffielderror_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005ffielderror_005f0, _jsp_getInstanceManager(), _jspx_th_s_005ffielderror_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fselect_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:select
|
||||
org.apache.struts2.views.jsp.ui.SelectTag _jspx_th_s_005fselect_005f0 = (org.apache.struts2.views.jsp.ui.SelectTag) _005fjspx_005ftagPool_005fs_005fselect_0026_005fname_005flist_005fheaderValue_005fheaderKey_005fnobody.get(org.apache.struts2.views.jsp.ui.SelectTag.class);
|
||||
boolean _jspx_th_s_005fselect_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fselect_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fselect_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /calculator.jsp(51,12) name = name type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fselect_005f0.setName("operator");
|
||||
// /calculator.jsp(51,12) name = list type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fselect_005f0.setList("{'+', '-', '*', '/'}");
|
||||
// /calculator.jsp(51,12) name = headerKey type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fselect_005f0.setHeaderKey("");
|
||||
// /calculator.jsp(51,12) name = headerValue type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fselect_005f0.setHeaderValue("选择运算符");
|
||||
int _jspx_eval_s_005fselect_005f0 = _jspx_th_s_005fselect_005f0.doStartTag();
|
||||
if (_jspx_th_s_005fselect_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fselect_0026_005fname_005flist_005fheaderValue_005fheaderKey_005fnobody.reuse(_jspx_th_s_005fselect_005f0);
|
||||
_jspx_th_s_005fselect_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fselect_005f0, _jsp_getInstanceManager(), _jspx_th_s_005fselect_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005ftextfield_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:textfield
|
||||
org.apache.struts2.views.jsp.ui.TextFieldTag _jspx_th_s_005ftextfield_005f1 = (org.apache.struts2.views.jsp.ui.TextFieldTag) _005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005fnobody.get(org.apache.struts2.views.jsp.ui.TextFieldTag.class);
|
||||
boolean _jspx_th_s_005ftextfield_005f1_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005ftextfield_005f1.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005ftextfield_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /calculator.jsp(56,12) name = name type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ftextfield_005f1.setName("num2");
|
||||
// /calculator.jsp(56,12) null
|
||||
_jspx_th_s_005ftextfield_005f1.setDynamicAttribute(null, "placeholder", "输入第二个数字");
|
||||
int _jspx_eval_s_005ftextfield_005f1 = _jspx_th_s_005ftextfield_005f1.doStartTag();
|
||||
if (_jspx_th_s_005ftextfield_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005fnobody.reuse(_jspx_th_s_005ftextfield_005f1);
|
||||
_jspx_th_s_005ftextfield_005f1_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005ftextfield_005f1, _jsp_getInstanceManager(), _jspx_th_s_005ftextfield_005f1_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005ffielderror_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:fielderror
|
||||
org.apache.struts2.views.jsp.ui.FieldErrorTag _jspx_th_s_005ffielderror_005f1 = (org.apache.struts2.views.jsp.ui.FieldErrorTag) _005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssClass_005fnobody.get(org.apache.struts2.views.jsp.ui.FieldErrorTag.class);
|
||||
boolean _jspx_th_s_005ffielderror_005f1_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005ffielderror_005f1.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005ffielderror_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /calculator.jsp(57,12) name = fieldName type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ffielderror_005f1.setFieldName("num2");
|
||||
// /calculator.jsp(57,12) name = cssClass type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ffielderror_005f1.setCssClass("error");
|
||||
int _jspx_eval_s_005ffielderror_005f1 = _jspx_th_s_005ffielderror_005f1.doStartTag();
|
||||
if (_jspx_th_s_005ffielderror_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssClass_005fnobody.reuse(_jspx_th_s_005ffielderror_005f1);
|
||||
_jspx_th_s_005ffielderror_005f1_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005ffielderror_005f1, _jsp_getInstanceManager(), _jspx_th_s_005ffielderror_005f1_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
BIN
target/tmp/jsp/org/apache/jsp/hello_jsp.class
Normal file
BIN
target/tmp/jsp/org/apache/jsp/hello_jsp.class
Normal file
Binary file not shown.
170
target/tmp/jsp/org/apache/jsp/hello_jsp.java
Normal file
170
target/tmp/jsp/org/apache/jsp/hello_jsp.java
Normal file
@@ -0,0 +1,170 @@
|
||||
/*
|
||||
* Generated by the Jasper component of Apache Tomcat
|
||||
* Version: jetty/9.4.54.v20240208
|
||||
* Generated at: 2026-03-12 11:40:01 UTC
|
||||
* Note: The last modified time of this file was set to
|
||||
* the last modified time of the source file after
|
||||
* generation to assist with modification tracking.
|
||||
*/
|
||||
package org.apache.jsp;
|
||||
|
||||
import javax.servlet.*;
|
||||
import javax.servlet.http.*;
|
||||
import javax.servlet.jsp.*;
|
||||
|
||||
public final class hello_jsp extends org.apache.jasper.runtime.HttpJspBase
|
||||
implements org.apache.jasper.runtime.JspSourceDependent,
|
||||
org.apache.jasper.runtime.JspSourceImports {
|
||||
|
||||
private static final javax.servlet.jsp.JspFactory _jspxFactory =
|
||||
javax.servlet.jsp.JspFactory.getDefaultFactory();
|
||||
|
||||
private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;
|
||||
|
||||
private static final java.util.Set<java.lang.String> _jspx_imports_packages;
|
||||
|
||||
private static final java.util.Set<java.lang.String> _jspx_imports_classes;
|
||||
|
||||
static {
|
||||
_jspx_imports_packages = new java.util.HashSet<>();
|
||||
_jspx_imports_packages.add("javax.servlet");
|
||||
_jspx_imports_packages.add("javax.servlet.http");
|
||||
_jspx_imports_packages.add("javax.servlet.jsp");
|
||||
_jspx_imports_classes = null;
|
||||
}
|
||||
|
||||
private volatile javax.el.ExpressionFactory _el_expressionfactory;
|
||||
private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;
|
||||
|
||||
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
|
||||
return _jspx_dependants;
|
||||
}
|
||||
|
||||
public java.util.Set<java.lang.String> getPackageImports() {
|
||||
return _jspx_imports_packages;
|
||||
}
|
||||
|
||||
public java.util.Set<java.lang.String> getClassImports() {
|
||||
return _jspx_imports_classes;
|
||||
}
|
||||
|
||||
public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
|
||||
if (_el_expressionfactory == null) {
|
||||
synchronized (this) {
|
||||
if (_el_expressionfactory == null) {
|
||||
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
return _el_expressionfactory;
|
||||
}
|
||||
|
||||
public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
|
||||
if (_jsp_instancemanager == null) {
|
||||
synchronized (this) {
|
||||
if (_jsp_instancemanager == null) {
|
||||
_jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
|
||||
}
|
||||
}
|
||||
}
|
||||
return _jsp_instancemanager;
|
||||
}
|
||||
|
||||
public void _jspInit() {
|
||||
}
|
||||
|
||||
public void _jspDestroy() {
|
||||
}
|
||||
|
||||
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
|
||||
throws java.io.IOException, javax.servlet.ServletException {
|
||||
|
||||
final java.lang.String _jspx_method = request.getMethod();
|
||||
if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method) && !javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
|
||||
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET, POST or HEAD. Jasper also permits OPTIONS");
|
||||
return;
|
||||
}
|
||||
|
||||
final javax.servlet.jsp.PageContext pageContext;
|
||||
javax.servlet.http.HttpSession session = null;
|
||||
final javax.servlet.ServletContext application;
|
||||
final javax.servlet.ServletConfig config;
|
||||
javax.servlet.jsp.JspWriter out = null;
|
||||
final java.lang.Object page = this;
|
||||
javax.servlet.jsp.JspWriter _jspx_out = null;
|
||||
javax.servlet.jsp.PageContext _jspx_page_context = null;
|
||||
|
||||
|
||||
try {
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
pageContext = _jspxFactory.getPageContext(this, request, response,
|
||||
null, true, 8192, true);
|
||||
_jspx_page_context = pageContext;
|
||||
application = pageContext.getServletContext();
|
||||
config = pageContext.getServletConfig();
|
||||
session = pageContext.getSession();
|
||||
out = pageContext.getOut();
|
||||
_jspx_out = out;
|
||||
|
||||
out.write("\n");
|
||||
out.write("<!DOCTYPE html>\n");
|
||||
out.write("<html>\n");
|
||||
out.write("<head>\n");
|
||||
out.write(" <meta charset=\"UTF-8\">\n");
|
||||
out.write(" <title>Hello 示例 - Struts2</title>\n");
|
||||
out.write(" <style>\n");
|
||||
out.write(" body { font-family: Arial, sans-serif; max-width: 900px; margin: 50px auto; padding: 20px; background:#f7f8fa; }\n");
|
||||
out.write(" .card { background:#fff; border-radius:14px; padding:24px; box-shadow:0 4px 14px rgba(0,0,0,.06); margin-bottom:20px; }\n");
|
||||
out.write(" h1 { color:#e74c3c; }\n");
|
||||
out.write(" .msg { font-size:1.3em; color:#2c3e50; margin-top:10px; }\n");
|
||||
out.write(" code { background:#f0f0f0; padding:2px 6px; border-radius:4px; }\n");
|
||||
out.write(" .lab { background:#fff7e6; border-left:4px solid #fa8c16; padding:15px; border-radius:8px; }\n");
|
||||
out.write(" a { color:#3498db; }\n");
|
||||
out.write(" </style>\n");
|
||||
out.write("</head>\n");
|
||||
out.write("<body>\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h1>👋 Hello 示例</h1>\n");
|
||||
out.write(" <p class=\"msg\">");
|
||||
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${message}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
|
||||
out.write("</p>\n");
|
||||
out.write(" <p>这是 Struts2 最基础的一条链路:浏览器请求 <code>/hello</code> → Struts2 匹配 Action → Action 返回结果名 → JSP 被渲染。</p>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"lab\">\n");
|
||||
out.write(" <strong>学习观察点</strong>\n");
|
||||
out.write(" <ul>\n");
|
||||
out.write(" <li>访问 URL:<code>/hello</code></li>\n");
|
||||
out.write(" <li>对应配置:<code>struts.xml</code> 里的 <code><action name=\"hello\" ...></code></li>\n");
|
||||
out.write(" <li>对应控制器:<code>HelloAction.execute()</code></li>\n");
|
||||
out.write(" <li>视图页面:当前这个 <code>hello.jsp</code></li>\n");
|
||||
out.write(" </ul>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>🔍 为什么这个例子重要</h3>\n");
|
||||
out.write(" <p>很多人一开始学 Struts2,会直接被拦截器、标签库、OGNL、配置文件吓到。Hello 示例的价值在于:先把“请求如何进来、结果如何出去”这条最小主线跑通,再去理解更复杂的机制。</p>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <p><a href=\"learn\">← 返回学习中心</a></p>\n");
|
||||
out.write("</body>\n");
|
||||
out.write("</html>\n");
|
||||
} catch (java.lang.Throwable t) {
|
||||
if (!(t instanceof javax.servlet.jsp.SkipPageException)){
|
||||
out = _jspx_out;
|
||||
if (out != null && out.getBufferSize() != 0)
|
||||
try {
|
||||
if (response.isCommitted()) {
|
||||
out.flush();
|
||||
} else {
|
||||
out.clearBuffer();
|
||||
}
|
||||
} catch (java.io.IOException e) {}
|
||||
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
|
||||
else throw new ServletException(t);
|
||||
}
|
||||
} finally {
|
||||
_jspxFactory.releasePageContext(_jspx_page_context);
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
target/tmp/jsp/org/apache/jsp/index_jsp.class
Normal file
BIN
target/tmp/jsp/org/apache/jsp/index_jsp.class
Normal file
Binary file not shown.
224
target/tmp/jsp/org/apache/jsp/index_jsp.java
Normal file
224
target/tmp/jsp/org/apache/jsp/index_jsp.java
Normal file
@@ -0,0 +1,224 @@
|
||||
/*
|
||||
* Generated by the Jasper component of Apache Tomcat
|
||||
* Version: jetty/9.4.54.v20240208
|
||||
* Generated at: 2026-03-12 11:39:53 UTC
|
||||
* Note: The last modified time of this file was set to
|
||||
* the last modified time of the source file after
|
||||
* generation to assist with modification tracking.
|
||||
*/
|
||||
package org.apache.jsp;
|
||||
|
||||
import javax.servlet.*;
|
||||
import javax.servlet.http.*;
|
||||
import javax.servlet.jsp.*;
|
||||
|
||||
public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase
|
||||
implements org.apache.jasper.runtime.JspSourceDependent,
|
||||
org.apache.jasper.runtime.JspSourceImports {
|
||||
|
||||
private static final javax.servlet.jsp.JspFactory _jspxFactory =
|
||||
javax.servlet.jsp.JspFactory.getDefaultFactory();
|
||||
|
||||
private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;
|
||||
|
||||
private static final java.util.Set<java.lang.String> _jspx_imports_packages;
|
||||
|
||||
private static final java.util.Set<java.lang.String> _jspx_imports_classes;
|
||||
|
||||
static {
|
||||
_jspx_imports_packages = new java.util.HashSet<>();
|
||||
_jspx_imports_packages.add("javax.servlet");
|
||||
_jspx_imports_packages.add("javax.servlet.http");
|
||||
_jspx_imports_packages.add("javax.servlet.jsp");
|
||||
_jspx_imports_classes = null;
|
||||
}
|
||||
|
||||
private volatile javax.el.ExpressionFactory _el_expressionfactory;
|
||||
private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;
|
||||
|
||||
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
|
||||
return _jspx_dependants;
|
||||
}
|
||||
|
||||
public java.util.Set<java.lang.String> getPackageImports() {
|
||||
return _jspx_imports_packages;
|
||||
}
|
||||
|
||||
public java.util.Set<java.lang.String> getClassImports() {
|
||||
return _jspx_imports_classes;
|
||||
}
|
||||
|
||||
public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
|
||||
if (_el_expressionfactory == null) {
|
||||
synchronized (this) {
|
||||
if (_el_expressionfactory == null) {
|
||||
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
return _el_expressionfactory;
|
||||
}
|
||||
|
||||
public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
|
||||
if (_jsp_instancemanager == null) {
|
||||
synchronized (this) {
|
||||
if (_jsp_instancemanager == null) {
|
||||
_jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
|
||||
}
|
||||
}
|
||||
}
|
||||
return _jsp_instancemanager;
|
||||
}
|
||||
|
||||
public void _jspInit() {
|
||||
}
|
||||
|
||||
public void _jspDestroy() {
|
||||
}
|
||||
|
||||
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
|
||||
throws java.io.IOException, javax.servlet.ServletException {
|
||||
|
||||
final java.lang.String _jspx_method = request.getMethod();
|
||||
if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method) && !javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
|
||||
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET, POST or HEAD. Jasper also permits OPTIONS");
|
||||
return;
|
||||
}
|
||||
|
||||
final javax.servlet.jsp.PageContext pageContext;
|
||||
javax.servlet.http.HttpSession session = null;
|
||||
final javax.servlet.ServletContext application;
|
||||
final javax.servlet.ServletConfig config;
|
||||
javax.servlet.jsp.JspWriter out = null;
|
||||
final java.lang.Object page = this;
|
||||
javax.servlet.jsp.JspWriter _jspx_out = null;
|
||||
javax.servlet.jsp.PageContext _jspx_page_context = null;
|
||||
|
||||
|
||||
try {
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
pageContext = _jspxFactory.getPageContext(this, request, response,
|
||||
null, true, 8192, true);
|
||||
_jspx_page_context = pageContext;
|
||||
application = pageContext.getServletContext();
|
||||
config = pageContext.getServletConfig();
|
||||
session = pageContext.getSession();
|
||||
out = pageContext.getOut();
|
||||
_jspx_out = out;
|
||||
|
||||
out.write("\n");
|
||||
out.write("<!DOCTYPE html>\n");
|
||||
out.write("<html>\n");
|
||||
out.write("<head>\n");
|
||||
out.write(" <meta charset=\"UTF-8\">\n");
|
||||
out.write(" <title>Struts2 Learning Scaffold</title>\n");
|
||||
out.write(" <style>\n");
|
||||
out.write(" body { font-family: Arial, sans-serif; max-width: 1100px; margin: 40px auto; padding: 20px; background:#f7f8fa; }\n");
|
||||
out.write(" .hero { background: linear-gradient(135deg,#ff7e5f,#feb47b); color:#fff; padding:30px; border-radius:16px; }\n");
|
||||
out.write(" .hero h1 { margin:0 0 10px; font-size:2.4em; }\n");
|
||||
out.write(" .hero p { font-size:1.1em; opacity: .95; }\n");
|
||||
out.write(" .grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap:18px; margin-top:24px; }\n");
|
||||
out.write(" .card { background:#fff; border-radius:14px; padding:20px; box-shadow:0 4px 14px rgba(0,0,0,.06); }\n");
|
||||
out.write(" .card h3 { margin-top:0; color:#e74c3c; }\n");
|
||||
out.write(" .btn { display:inline-block; background:#3498db; color:#fff; padding:10px 18px; margin-top:10px; text-decoration:none; border-radius:8px; }\n");
|
||||
out.write(" .btn:hover { background:#2980b9; }\n");
|
||||
out.write(" .btn.green { background:#27ae60; }\n");
|
||||
out.write(" .btn.purple { background:#9b59b6; }\n");
|
||||
out.write(" .lab { background:#fff7e6; border-left:4px solid #fa8c16; padding:16px; border-radius:10px; margin-top:24px; }\n");
|
||||
out.write(" .lab ul { line-height:1.8; }\n");
|
||||
out.write(" .timeline { background:#fff; border-radius:14px; padding:20px; margin-top:24px; box-shadow:0 4px 14px rgba(0,0,0,.06); }\n");
|
||||
out.write(" .timeline li { margin:10px 0; line-height:1.7; }\n");
|
||||
out.write(" code { background:#f0f0f0; padding:2px 6px; border-radius:4px; }\n");
|
||||
out.write(" </style>\n");
|
||||
out.write("</head>\n");
|
||||
out.write("<body>\n");
|
||||
out.write(" <div class=\"hero\">\n");
|
||||
out.write(" <h1>🚀 Struts2 Learning Scaffold</h1>\n");
|
||||
out.write(" <p>不是单纯的 Struts2 演示页,而是一套带任务卡、表单实验、拦截器观察和 CRUD 流程的学习脚手架。</p>\n");
|
||||
out.write(" <a href=\"learn\" class=\"btn green\">进入学习中心</a>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"lab\">\n");
|
||||
out.write(" <strong>推荐学习顺序</strong>\n");
|
||||
out.write(" <ul>\n");
|
||||
out.write(" <li><strong>第一步:</strong> 进入 <a href=\"hello\">Hello 示例</a>,理解 Action → JSP 的最小闭环</li>\n");
|
||||
out.write(" <li><strong>第二步:</strong> 进入 <a href=\"calc\">计算器</a>,体验表单绑定、校验、错误回显</li>\n");
|
||||
out.write(" <li><strong>第三步:</strong> 进入 <a href=\"interceptor\">拦截器演示</a>,观察请求被增强的过程</li>\n");
|
||||
out.write(" <li><strong>第四步:</strong> 进入 <a href=\"user\">用户管理</a>,学习列表/表单/增删改的完整流程</li>\n");
|
||||
out.write(" </ul>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"grid\">\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>👋 Hello 示例</h3>\n");
|
||||
out.write(" <p>最小 Action 示例,适合理解 Struts2 如何把请求映射到 Action,再把数据渲染到 JSP。</p>\n");
|
||||
out.write(" <a href=\"hello\" class=\"btn\">打开示例</a>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>🔢 计算器实验</h3>\n");
|
||||
out.write(" <p>学习参数绑定、<code>validate()</code> 校验、字段错误回显,以及成功/失败两条分支。</p>\n");
|
||||
out.write(" <a href=\"calc\" class=\"btn\">开始实验</a>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>🛡️ 拦截器观察</h3>\n");
|
||||
out.write(" <p>重点模块。能看到日志、执行时间、限流、监控等拦截器如何织入请求链路。</p>\n");
|
||||
out.write(" <a href=\"interceptor\" class=\"btn purple\">观察拦截器</a>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>👥 用户 CRUD</h3>\n");
|
||||
out.write(" <p>从列表页到表单页,再到新增/编辑/删除,形成完整的 Struts2 业务流学习闭环。</p>\n");
|
||||
out.write(" <a href=\"user\" class=\"btn green\">进入 CRUD</a>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>🧪 OGNL / 参数绑定实验</h3>\n");
|
||||
out.write(" <p>可视化体验普通字段、嵌套对象、多选列表是如何被 Struts2 自动绑定到 Action 的。</p>\n");
|
||||
out.write(" <a href=\"ognl\" class=\"btn purple\">进入实验室</a>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>⚠️ 验证与错误流实验</h3>\n");
|
||||
out.write(" <p>通过错误示例/正确示例切换,直观看到字段错误、input 返回和成功路径的区别。</p>\n");
|
||||
out.write(" <a href=\"validation\" class=\"btn\">进入实验室</a>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>🚀 AJAX 异步交互</h3>\n");
|
||||
out.write(" <p>学习Struts2如何处理AJAX请求,返回JSON数据,实现前后端分离交互。</p>\n");
|
||||
out.write(" <a href=\"ajax\" class=\"btn purple\">AJAX演示</a>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>📁 文件上传</h3>\n");
|
||||
out.write(" <p>演示单文件、多文件上传,文件类型和大小验证,以及文件处理流程。</p>\n");
|
||||
out.write(" <a href=\"upload\" class=\"btn green\">文件上传</a>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"timeline\">\n");
|
||||
out.write(" <h3>📚 你会学到什么</h3>\n");
|
||||
out.write(" <ul>\n");
|
||||
out.write(" <li><strong>请求入口:</strong><code>StrutsPrepareAndExecuteFilter</code> 如何接管请求</li>\n");
|
||||
out.write(" <li><strong>控制层:</strong>Action 如何接收参数、执行业务、返回 result</li>\n");
|
||||
out.write(" <li><strong>视图层:</strong>JSP + Struts 标签库如何绑定 Action 数据</li>\n");
|
||||
out.write(" <li><strong>增强机制:</strong>Interceptor Stack 如何像 AOP 一样织入日志、校验、限流</li>\n");
|
||||
out.write(" <li><strong>状态流转:</strong>输入错误、成功提交、重定向返回列表等典型页面流</li>\n");
|
||||
out.write(" </ul>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("</body>\n");
|
||||
out.write("</html>\n");
|
||||
} catch (java.lang.Throwable t) {
|
||||
if (!(t instanceof javax.servlet.jsp.SkipPageException)){
|
||||
out = _jspx_out;
|
||||
if (out != null && out.getBufferSize() != 0)
|
||||
try {
|
||||
if (response.isCommitted()) {
|
||||
out.flush();
|
||||
} else {
|
||||
out.clearBuffer();
|
||||
}
|
||||
} catch (java.io.IOException e) {}
|
||||
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
|
||||
else throw new ServletException(t);
|
||||
}
|
||||
} finally {
|
||||
_jspxFactory.releasePageContext(_jspx_page_context);
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
target/tmp/jsp/org/apache/jsp/interceptor_002ddemo_jsp.class
Normal file
BIN
target/tmp/jsp/org/apache/jsp/interceptor_002ddemo_jsp.class
Normal file
Binary file not shown.
364
target/tmp/jsp/org/apache/jsp/interceptor_002ddemo_jsp.java
Normal file
364
target/tmp/jsp/org/apache/jsp/interceptor_002ddemo_jsp.java
Normal file
@@ -0,0 +1,364 @@
|
||||
/*
|
||||
* Generated by the Jasper component of Apache Tomcat
|
||||
* Version: jetty/9.4.54.v20240208
|
||||
* Generated at: 2026-03-12 22:21:50 UTC
|
||||
* Note: The last modified time of this file was set to
|
||||
* the last modified time of the source file after
|
||||
* generation to assist with modification tracking.
|
||||
*/
|
||||
package org.apache.jsp;
|
||||
|
||||
import javax.servlet.*;
|
||||
import javax.servlet.http.*;
|
||||
import javax.servlet.jsp.*;
|
||||
|
||||
public final class interceptor_002ddemo_jsp extends org.apache.jasper.runtime.HttpJspBase
|
||||
implements org.apache.jasper.runtime.JspSourceDependent,
|
||||
org.apache.jasper.runtime.JspSourceImports {
|
||||
|
||||
private static final javax.servlet.jsp.JspFactory _jspxFactory =
|
||||
javax.servlet.jsp.JspFactory.getDefaultFactory();
|
||||
|
||||
private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;
|
||||
|
||||
static {
|
||||
_jspx_dependants = new java.util.HashMap<java.lang.String,java.lang.Long>(2);
|
||||
_jspx_dependants.put("file:/home/llm/.m2/repository/org/apache/struts/struts2-core/6.4.0/struts2-core-6.4.0.jar", Long.valueOf(1772603570859L));
|
||||
_jspx_dependants.put("jar:file:/home/llm/.m2/repository/org/apache/struts/struts2-core/6.4.0/struts2-core-6.4.0.jar!/META-INF/struts-tags.tld", Long.valueOf(1712452520000L));
|
||||
}
|
||||
|
||||
private static final java.util.Set<java.lang.String> _jspx_imports_packages;
|
||||
|
||||
private static final java.util.Set<java.lang.String> _jspx_imports_classes;
|
||||
|
||||
static {
|
||||
_jspx_imports_packages = new java.util.HashSet<>();
|
||||
_jspx_imports_packages.add("javax.servlet");
|
||||
_jspx_imports_packages.add("javax.servlet.http");
|
||||
_jspx_imports_packages.add("javax.servlet.jsp");
|
||||
_jspx_imports_classes = null;
|
||||
}
|
||||
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fiterator_0026_005fvar_005fvalue;
|
||||
|
||||
private volatile javax.el.ExpressionFactory _el_expressionfactory;
|
||||
private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;
|
||||
|
||||
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
|
||||
return _jspx_dependants;
|
||||
}
|
||||
|
||||
public java.util.Set<java.lang.String> getPackageImports() {
|
||||
return _jspx_imports_packages;
|
||||
}
|
||||
|
||||
public java.util.Set<java.lang.String> getClassImports() {
|
||||
return _jspx_imports_classes;
|
||||
}
|
||||
|
||||
public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
|
||||
if (_el_expressionfactory == null) {
|
||||
synchronized (this) {
|
||||
if (_el_expressionfactory == null) {
|
||||
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
return _el_expressionfactory;
|
||||
}
|
||||
|
||||
public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
|
||||
if (_jsp_instancemanager == null) {
|
||||
synchronized (this) {
|
||||
if (_jsp_instancemanager == null) {
|
||||
_jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
|
||||
}
|
||||
}
|
||||
}
|
||||
return _jsp_instancemanager;
|
||||
}
|
||||
|
||||
public void _jspInit() {
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005fiterator_0026_005fvar_005fvalue = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
}
|
||||
|
||||
public void _jspDestroy() {
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.release();
|
||||
_005fjspx_005ftagPool_005fs_005fiterator_0026_005fvar_005fvalue.release();
|
||||
}
|
||||
|
||||
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
|
||||
throws java.io.IOException, javax.servlet.ServletException {
|
||||
|
||||
final java.lang.String _jspx_method = request.getMethod();
|
||||
if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method) && !javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
|
||||
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET, POST or HEAD. Jasper also permits OPTIONS");
|
||||
return;
|
||||
}
|
||||
|
||||
final javax.servlet.jsp.PageContext pageContext;
|
||||
javax.servlet.http.HttpSession session = null;
|
||||
final javax.servlet.ServletContext application;
|
||||
final javax.servlet.ServletConfig config;
|
||||
javax.servlet.jsp.JspWriter out = null;
|
||||
final java.lang.Object page = this;
|
||||
javax.servlet.jsp.JspWriter _jspx_out = null;
|
||||
javax.servlet.jsp.PageContext _jspx_page_context = null;
|
||||
|
||||
|
||||
try {
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
pageContext = _jspxFactory.getPageContext(this, request, response,
|
||||
null, true, 8192, true);
|
||||
_jspx_page_context = pageContext;
|
||||
application = pageContext.getServletContext();
|
||||
config = pageContext.getServletConfig();
|
||||
session = pageContext.getSession();
|
||||
out = pageContext.getOut();
|
||||
_jspx_out = out;
|
||||
|
||||
out.write("\n");
|
||||
out.write("\n");
|
||||
out.write("<!DOCTYPE html>\n");
|
||||
out.write("<html>\n");
|
||||
out.write("<head>\n");
|
||||
out.write(" <meta charset=\"UTF-8\">\n");
|
||||
out.write(" <title>拦截器演示 - Struts2</title>\n");
|
||||
out.write(" <style>\n");
|
||||
out.write(" body { font-family: Arial, sans-serif; max-width: 900px; margin: 50px auto; padding: 20px; }\n");
|
||||
out.write(" h1 { color: #e74c3c; }\n");
|
||||
out.write(" h2 { color: #3498db; border-bottom: 2px solid #3498db; padding-bottom: 10px; }\n");
|
||||
out.write(" .card { background: #f9f9f9; padding: 20px; margin: 15px 0; border-radius: 8px; }\n");
|
||||
out.write(" .card h3 { margin-top: 0; color: #2c3e50; }\n");
|
||||
out.write(" code { background: #eee; padding: 2px 6px; border-radius: 3px; }\n");
|
||||
out.write(" pre { background: #2c3e50; color: #ecf0f1; padding: 15px; border-radius: 5px; overflow-x: auto; }\n");
|
||||
out.write(" table { width: 100%; border-collapse: collapse; margin: 10px 0; }\n");
|
||||
out.write(" th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }\n");
|
||||
out.write(" th { background: #3498db; color: white; }\n");
|
||||
out.write(" .time { color: #27ae60; font-weight: bold; }\n");
|
||||
out.write(" .api-link { display: inline-block; background: #9b59b6; color: white; padding: 10px 20px; \n");
|
||||
out.write(" text-decoration: none; border-radius: 5px; margin: 5px; }\n");
|
||||
out.write(" .lab { background:#fff7e6; border-left:4px solid #fa8c16; padding:15px; border-radius:8px; margin:20px 0; }\n");
|
||||
out.write(" </style>\n");
|
||||
out.write("</head>\n");
|
||||
out.write("<body>\n");
|
||||
out.write(" <h1>🛡️ Struts2 拦截器演示</h1>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"lab\">\n");
|
||||
out.write(" <strong>实验观察点:</strong>\n");
|
||||
out.write(" <ul>\n");
|
||||
out.write(" <li>连续刷新页面,观察 Action 调用次数如何累积</li>\n");
|
||||
out.write(" <li>切换到“API 限流栈”,理解为什么拦截器顺序会影响结果</li>\n");
|
||||
out.write(" <li>注意执行时间显示,这就是拦截器注入到 request 的数据</li>\n");
|
||||
out.write(" </ul>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" \n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>📊 执行统计</h3>\n");
|
||||
out.write(" <p>本次请求执行时间: <span class=\"time\">");
|
||||
if (_jspx_meth_s_005fproperty_005f0(_jspx_page_context))
|
||||
return;
|
||||
out.write(" ms</span></p>\n");
|
||||
out.write(" \n");
|
||||
out.write(" <h4>Action 调用统计:</h4>\n");
|
||||
out.write(" <table>\n");
|
||||
out.write(" <tr><th>Action</th><th>调用次数</th></tr>\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005fiterator_005f0(_jspx_page_context))
|
||||
return;
|
||||
out.write("\n");
|
||||
out.write(" </table>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" \n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>🔗 拦截器链演示</h3>\n");
|
||||
out.write(" <p>当前使用: <code>customStack</code> (日志 + 计时 + 监控 + 默认栈)</p>\n");
|
||||
out.write(" <a class=\"api-link\" href=\"interceptor_api\">切换到 API 限流栈</a>\n");
|
||||
out.write(" <a class=\"api-link\" href=\"interceptor\">恢复默认栈</a>\n");
|
||||
out.write(" <p>API 栈包含: 日志 + 限流 + 验证 + 计时 + 默认栈</p>\n");
|
||||
out.write(" <table>\n");
|
||||
out.write(" <tr><th>拦截器</th><th>作用</th><th>你应该观察什么</th></tr>\n");
|
||||
out.write(" <tr><td>LoggingInterceptor</td><td>记录请求进入/退出</td><td>看日志顺序,理解责任链</td></tr>\n");
|
||||
out.write(" <tr><td>TimingInterceptor</td><td>统计执行耗时</td><td>看 executionTime 如何注入 request</td></tr>\n");
|
||||
out.write(" <tr><td>MonitorInterceptor</td><td>累积 Action 调用统计</td><td>连续刷新看调用数增长</td></tr>\n");
|
||||
out.write(" <tr><td>RateLimitInterceptor</td><td>限制频率</td><td>API 栈里观察限流触发</td></tr>\n");
|
||||
out.write(" <tr><td>ValidationInterceptor</td><td>校验输入</td><td>思考错误应该在哪一层拦截</td></tr>\n");
|
||||
out.write(" </table>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" \n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>🧪 快速实验建议</h3>\n");
|
||||
out.write(" <ul>\n");
|
||||
out.write(" <li>先刷新当前页两次,看调用统计是否增加</li>\n");
|
||||
out.write(" <li>再切到 <code>interceptor_api</code>,对比多了哪些拦截器</li>\n");
|
||||
out.write(" <li>观察“先进入后退出”的洋葱模型</li>\n");
|
||||
out.write(" <li>思考:如果你要加鉴权,应放在哪个拦截器位置最合理?</li>\n");
|
||||
out.write(" </ul>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>📚 拦截器执行顺序</h3>\n");
|
||||
out.write(" <pre>\n");
|
||||
out.write("请求 → LoggingInterceptor → TimingInterceptor → MonitorInterceptor → Action\n");
|
||||
out.write("响应 ← LoggingInterceptor ← TimingInterceptor ← MonitorInterceptor ← Result\n");
|
||||
out.write(" </pre>\n");
|
||||
out.write(" <p><strong>注意:</strong> 拦截器像洋葱一样,先进入的后退出</p>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" \n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>💡 拦截器核心概念</h3>\n");
|
||||
out.write(" <ul>\n");
|
||||
out.write(" <li><strong>Interceptor 接口:</strong> init() → intercept() → destroy()</li>\n");
|
||||
out.write(" <li><strong>intercept() 方法:</strong> 调用 invocation.invoke() 继续链</li>\n");
|
||||
out.write(" <li><strong>拦截器栈:</strong> 多个拦截器按顺序组成链</li>\n");
|
||||
out.write(" <li><strong>责任链模式:</strong> 每个拦截器决定是否继续</li>\n");
|
||||
out.write(" </ul>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" \n");
|
||||
out.write(" <p><a href=\"learn\">← 返回学习中心</a></p>\n");
|
||||
out.write("</body>\n");
|
||||
out.write("</html>");
|
||||
} catch (java.lang.Throwable t) {
|
||||
if (!(t instanceof javax.servlet.jsp.SkipPageException)){
|
||||
out = _jspx_out;
|
||||
if (out != null && out.getBufferSize() != 0)
|
||||
try {
|
||||
if (response.isCommitted()) {
|
||||
out.flush();
|
||||
} else {
|
||||
out.clearBuffer();
|
||||
}
|
||||
} catch (java.io.IOException e) {}
|
||||
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
|
||||
else throw new ServletException(t);
|
||||
}
|
||||
} finally {
|
||||
_jspxFactory.releasePageContext(_jspx_page_context);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f0 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f0.setParent(null);
|
||||
// /interceptor-demo.jsp(39,40) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f0.setValue("executionTime / 1000000.0");
|
||||
int _jspx_eval_s_005fproperty_005f0 = _jspx_th_s_005fproperty_005f0.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f0);
|
||||
_jspx_th_s_005fproperty_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f0, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fiterator_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:iterator
|
||||
org.apache.struts2.views.jsp.IteratorTag _jspx_th_s_005fiterator_005f0 = (org.apache.struts2.views.jsp.IteratorTag) _005fjspx_005ftagPool_005fs_005fiterator_0026_005fvar_005fvalue.get(org.apache.struts2.views.jsp.IteratorTag.class);
|
||||
boolean _jspx_th_s_005fiterator_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fiterator_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fiterator_005f0.setParent(null);
|
||||
// /interceptor-demo.jsp(44,12) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fiterator_005f0.setValue("interceptorStats");
|
||||
// /interceptor-demo.jsp(44,12) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fiterator_005f0.setVar("entry");
|
||||
int _jspx_eval_s_005fiterator_005f0 = _jspx_th_s_005fiterator_005f0.doStartTag();
|
||||
if (_jspx_eval_s_005fiterator_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
|
||||
if (_jspx_eval_s_005fiterator_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = org.apache.jasper.runtime.JspRuntimeLibrary.startBufferedBody(_jspx_page_context, _jspx_th_s_005fiterator_005f0);
|
||||
}
|
||||
do {
|
||||
out.write("\n");
|
||||
out.write(" <tr>\n");
|
||||
out.write(" <td>");
|
||||
if (_jspx_meth_s_005fproperty_005f1(_jspx_th_s_005fiterator_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("</td>\n");
|
||||
out.write(" <td>");
|
||||
if (_jspx_meth_s_005fproperty_005f2(_jspx_th_s_005fiterator_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("</td>\n");
|
||||
out.write(" </tr>\n");
|
||||
out.write(" ");
|
||||
int evalDoAfterBody = _jspx_th_s_005fiterator_005f0.doAfterBody();
|
||||
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
|
||||
break;
|
||||
} while (true);
|
||||
if (_jspx_eval_s_005fiterator_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = _jspx_page_context.popBody();
|
||||
}
|
||||
}
|
||||
if (_jspx_th_s_005fiterator_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fiterator_0026_005fvar_005fvalue.reuse(_jspx_th_s_005fiterator_005f0);
|
||||
_jspx_th_s_005fiterator_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fiterator_005f0, _jsp_getInstanceManager(), _jspx_th_s_005fiterator_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fiterator_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f1 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f1_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f1.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fiterator_005f0);
|
||||
// /interceptor-demo.jsp(46,24) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f1.setValue("#entry.key");
|
||||
int _jspx_eval_s_005fproperty_005f1 = _jspx_th_s_005fproperty_005f1.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f1);
|
||||
_jspx_th_s_005fproperty_005f1_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f1, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f1_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fiterator_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f2 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f2_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f2.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fiterator_005f0);
|
||||
// /interceptor-demo.jsp(47,24) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f2.setValue("#entry.value");
|
||||
int _jspx_eval_s_005fproperty_005f2 = _jspx_th_s_005fproperty_005f2.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f2);
|
||||
_jspx_th_s_005fproperty_005f2_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f2, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f2_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
BIN
target/tmp/jsp/org/apache/jsp/learn_jsp.class
Normal file
BIN
target/tmp/jsp/org/apache/jsp/learn_jsp.class
Normal file
Binary file not shown.
260
target/tmp/jsp/org/apache/jsp/learn_jsp.java
Normal file
260
target/tmp/jsp/org/apache/jsp/learn_jsp.java
Normal file
@@ -0,0 +1,260 @@
|
||||
/*
|
||||
* Generated by the Jasper component of Apache Tomcat
|
||||
* Version: jetty/9.4.54.v20240208
|
||||
* Generated at: 2026-03-12 22:21:47 UTC
|
||||
* Note: The last modified time of this file was set to
|
||||
* the last modified time of the source file after
|
||||
* generation to assist with modification tracking.
|
||||
*/
|
||||
package org.apache.jsp;
|
||||
|
||||
import javax.servlet.*;
|
||||
import javax.servlet.http.*;
|
||||
import javax.servlet.jsp.*;
|
||||
|
||||
public final class learn_jsp extends org.apache.jasper.runtime.HttpJspBase
|
||||
implements org.apache.jasper.runtime.JspSourceDependent,
|
||||
org.apache.jasper.runtime.JspSourceImports {
|
||||
|
||||
private static final javax.servlet.jsp.JspFactory _jspxFactory =
|
||||
javax.servlet.jsp.JspFactory.getDefaultFactory();
|
||||
|
||||
private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;
|
||||
|
||||
static {
|
||||
_jspx_dependants = new java.util.HashMap<java.lang.String,java.lang.Long>(2);
|
||||
_jspx_dependants.put("file:/home/llm/.m2/repository/org/apache/struts/struts2-core/6.4.0/struts2-core-6.4.0.jar", Long.valueOf(1772603570859L));
|
||||
_jspx_dependants.put("jar:file:/home/llm/.m2/repository/org/apache/struts/struts2-core/6.4.0/struts2-core-6.4.0.jar!/META-INF/struts-tags.tld", Long.valueOf(1712452520000L));
|
||||
}
|
||||
|
||||
private static final java.util.Set<java.lang.String> _jspx_imports_packages;
|
||||
|
||||
private static final java.util.Set<java.lang.String> _jspx_imports_classes;
|
||||
|
||||
static {
|
||||
_jspx_imports_packages = new java.util.HashSet<>();
|
||||
_jspx_imports_packages.add("javax.servlet");
|
||||
_jspx_imports_packages.add("javax.servlet.http");
|
||||
_jspx_imports_packages.add("javax.servlet.jsp");
|
||||
_jspx_imports_classes = null;
|
||||
}
|
||||
|
||||
private volatile javax.el.ExpressionFactory _el_expressionfactory;
|
||||
private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;
|
||||
|
||||
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
|
||||
return _jspx_dependants;
|
||||
}
|
||||
|
||||
public java.util.Set<java.lang.String> getPackageImports() {
|
||||
return _jspx_imports_packages;
|
||||
}
|
||||
|
||||
public java.util.Set<java.lang.String> getClassImports() {
|
||||
return _jspx_imports_classes;
|
||||
}
|
||||
|
||||
public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
|
||||
if (_el_expressionfactory == null) {
|
||||
synchronized (this) {
|
||||
if (_el_expressionfactory == null) {
|
||||
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
return _el_expressionfactory;
|
||||
}
|
||||
|
||||
public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
|
||||
if (_jsp_instancemanager == null) {
|
||||
synchronized (this) {
|
||||
if (_jsp_instancemanager == null) {
|
||||
_jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
|
||||
}
|
||||
}
|
||||
}
|
||||
return _jsp_instancemanager;
|
||||
}
|
||||
|
||||
public void _jspInit() {
|
||||
}
|
||||
|
||||
public void _jspDestroy() {
|
||||
}
|
||||
|
||||
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
|
||||
throws java.io.IOException, javax.servlet.ServletException {
|
||||
|
||||
final java.lang.String _jspx_method = request.getMethod();
|
||||
if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method) && !javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
|
||||
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET, POST or HEAD. Jasper also permits OPTIONS");
|
||||
return;
|
||||
}
|
||||
|
||||
final javax.servlet.jsp.PageContext pageContext;
|
||||
javax.servlet.http.HttpSession session = null;
|
||||
final javax.servlet.ServletContext application;
|
||||
final javax.servlet.ServletConfig config;
|
||||
javax.servlet.jsp.JspWriter out = null;
|
||||
final java.lang.Object page = this;
|
||||
javax.servlet.jsp.JspWriter _jspx_out = null;
|
||||
javax.servlet.jsp.PageContext _jspx_page_context = null;
|
||||
|
||||
|
||||
try {
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
pageContext = _jspxFactory.getPageContext(this, request, response,
|
||||
null, true, 8192, true);
|
||||
_jspx_page_context = pageContext;
|
||||
application = pageContext.getServletContext();
|
||||
config = pageContext.getServletConfig();
|
||||
session = pageContext.getSession();
|
||||
out = pageContext.getOut();
|
||||
_jspx_out = out;
|
||||
|
||||
out.write("\n");
|
||||
out.write("\n");
|
||||
out.write("<!DOCTYPE html>\n");
|
||||
out.write("<html>\n");
|
||||
out.write("<head>\n");
|
||||
out.write(" <meta charset=\"UTF-8\">\n");
|
||||
out.write(" <title>Struts2 学习中心</title>\n");
|
||||
out.write(" <style>\n");
|
||||
out.write(" body { font-family: Arial, sans-serif; max-width: 1000px; margin: 40px auto; padding: 20px; background:#f7f8fa; }\n");
|
||||
out.write(" h1 { color: #e74c3c; }\n");
|
||||
out.write(" h2 { color: #3498db; border-bottom: 2px solid #3498db; padding-bottom: 10px; }\n");
|
||||
out.write(" .card { background: #fff; padding: 20px; border-radius: 12px; margin: 20px 0; box-shadow:0 4px 14px rgba(0,0,0,.06); }\n");
|
||||
out.write(" .card h3 { margin-top: 0; }\n");
|
||||
out.write(" ul { line-height: 1.9; }\n");
|
||||
out.write(" a { color: #3498db; text-decoration: none; }\n");
|
||||
out.write(" a:hover { text-decoration: underline; }\n");
|
||||
out.write(" .btn { display: inline-block; background: #3498db; color: white; padding: 10px 20px; border-radius: 6px; margin: 5px; }\n");
|
||||
out.write(" .btn:hover { text-decoration: none; background: #2980b9; }\n");
|
||||
out.write(" .btn-green { background: #27ae60; }\n");
|
||||
out.write(" .btn-purple { background: #9b59b6; }\n");
|
||||
out.write(" code { background: #eee; padding: 2px 6px; border-radius: 3px; }\n");
|
||||
out.write(" .lab { background:#fff7e6; border-left:4px solid #fa8c16; padding:15px; border-radius:8px; margin:20px 0; }\n");
|
||||
out.write(" .quick-tools { display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }\n");
|
||||
out.write(" .grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:16px; }\n");
|
||||
out.write(" </style>\n");
|
||||
out.write("</head>\n");
|
||||
out.write("<body>\n");
|
||||
out.write(" <h1>🎓 Struts2 学习中心</h1>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"lab\">\n");
|
||||
out.write(" <strong>🧪 学习任务卡</strong>\n");
|
||||
out.write(" <ul>\n");
|
||||
out.write(" <li>先点“拦截器演示”,观察执行统计和链路顺序</li>\n");
|
||||
out.write(" <li>再点“计算器”,故意输入非法值体验 Struts2 校验</li>\n");
|
||||
out.write(" <li>最后点“用户管理”,理解 Action + JSP + 表单提交流程</li>\n");
|
||||
out.write(" </ul>\n");
|
||||
out.write(" <div class=\"quick-tools\">\n");
|
||||
out.write(" <a class=\"btn btn-purple\" href=\"interceptor\">直接去拦截器实验</a>\n");
|
||||
out.write(" <a class=\"btn\" href=\"calc\">直接去计算器实验</a>\n");
|
||||
out.write(" <a class=\"btn btn-green\" href=\"user\">直接去用户管理实验</a>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"grid\">\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>👋 最小闭环</h3>\n");
|
||||
out.write(" <p>从 <code>/hello</code> 开始,看 Action 如何返回 JSP 页面。</p>\n");
|
||||
out.write(" <a class=\"btn\" href=\"hello\">打开 Hello</a>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>🔢 表单与校验</h3>\n");
|
||||
out.write(" <p>用计算器理解参数绑定、校验失败回显、成功结果显示。</p>\n");
|
||||
out.write(" <a class=\"btn\" href=\"calc\">打开计算器</a>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>🛡️ 拦截器机制</h3>\n");
|
||||
out.write(" <p>学习 Struts2 最核心的增强机制:日志、计时、限流、监控。</p>\n");
|
||||
out.write(" <a class=\"btn btn-purple\" href=\"interceptor\">打开拦截器实验</a>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>👥 CRUD 业务流</h3>\n");
|
||||
out.write(" <p>通过用户管理体验列表页、表单页、重定向和状态更新。</p>\n");
|
||||
out.write(" <a class=\"btn btn-green\" href=\"user\">打开用户管理</a>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>🧪 OGNL / 参数绑定实验</h3>\n");
|
||||
out.write(" <p>通过真正可交互的表单观察 Struts2 的字段绑定、嵌套对象绑定和集合绑定。</p>\n");
|
||||
out.write(" <a class=\"btn btn-purple\" href=\"ognl\">打开 OGNL 实验室</a>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>⚠️ 验证与错误流实验</h3>\n");
|
||||
out.write(" <p>学习为什么校验失败不会直接 500,而是回到 input 页面并显示字段级错误。</p>\n");
|
||||
out.write(" <a class=\"btn\" href=\"validation\">打开验证实验室</a>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>🚀 AJAX 异步交互</h3>\n");
|
||||
out.write(" <p>学习Struts2如何处理AJAX请求,返回JSON数据,实现无刷新交互和实时数据更新。</p>\n");
|
||||
out.write(" <a class=\"btn purple\" href=\"ajax\">打开AJAX演示</a>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>📁 文件上传</h3>\n");
|
||||
out.write(" <p>演示单文件和多文件上传,学习文件类型验证、大小限制和文件处理流程。</p>\n");
|
||||
out.write(" <a class=\"btn green\" href=\"upload\">打开文件上传</a>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <h2>📚 学习路径</h2>\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>1. MVC 架构</h3>\n");
|
||||
out.write(" <ul>\n");
|
||||
out.write(" <li><strong>Model:</strong> Action 类 + JavaBean</li>\n");
|
||||
out.write(" <li><strong>View:</strong> JSP + Struts 标签库</li>\n");
|
||||
out.write(" <li><strong>Controller:</strong> StrutsPrepareAndExecuteFilter</li>\n");
|
||||
out.write(" </ul>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>2. 拦截器机制</h3>\n");
|
||||
out.write(" <ul>\n");
|
||||
out.write(" <li><code>Interceptor</code> 接口: init() → intercept() → destroy()</li>\n");
|
||||
out.write(" <li><code>interceptor-stack</code>: 组合多个拦截器</li>\n");
|
||||
out.write(" <li>执行顺序: 责任链模式(先入后出)</li>\n");
|
||||
out.write(" </ul>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>3. OGNL 与标签库</h3>\n");
|
||||
out.write(" <ul>\n");
|
||||
out.write(" <li><code><s:property value=\"name\"/></code> - 输出属性</li>\n");
|
||||
out.write(" <li><code><s:iterator value=\"list\"></code> - 遍历集合</li>\n");
|
||||
out.write(" <li><code><s:form></code> + <code><s:textfield></code> - 表单绑定</li>\n");
|
||||
out.write(" </ul>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>4. 你当前项目里有哪些实验</h3>\n");
|
||||
out.write(" <ul>\n");
|
||||
out.write(" <li><strong>Hello:</strong>最小 Action/JSP 映射</li>\n");
|
||||
out.write(" <li><strong>Calculator:</strong>参数绑定 + 校验 + 错误回显</li>\n");
|
||||
out.write(" <li><strong>Interceptor:</strong>理解自定义拦截器与请求链</li>\n");
|
||||
out.write(" <li><strong>User CRUD:</strong>模拟真实业务增删改查</li>\n");
|
||||
out.write(" </ul>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <p><a href=\"/\">← 返回首页</a></p>\n");
|
||||
out.write("</body>\n");
|
||||
out.write("</html>\n");
|
||||
} catch (java.lang.Throwable t) {
|
||||
if (!(t instanceof javax.servlet.jsp.SkipPageException)){
|
||||
out = _jspx_out;
|
||||
if (out != null && out.getBufferSize() != 0)
|
||||
try {
|
||||
if (response.isCommitted()) {
|
||||
out.flush();
|
||||
} else {
|
||||
out.clearBuffer();
|
||||
}
|
||||
} catch (java.io.IOException e) {}
|
||||
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
|
||||
else throw new ServletException(t);
|
||||
}
|
||||
} finally {
|
||||
_jspxFactory.releasePageContext(_jspx_page_context);
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
target/tmp/jsp/org/apache/jsp/ognl_002dlab_jsp.class
Normal file
BIN
target/tmp/jsp/org/apache/jsp/ognl_002dlab_jsp.class
Normal file
Binary file not shown.
642
target/tmp/jsp/org/apache/jsp/ognl_002dlab_jsp.java
Normal file
642
target/tmp/jsp/org/apache/jsp/ognl_002dlab_jsp.java
Normal file
@@ -0,0 +1,642 @@
|
||||
/*
|
||||
* Generated by the Jasper component of Apache Tomcat
|
||||
* Version: jetty/9.4.54.v20240208
|
||||
* Generated at: 2026-03-12 22:21:44 UTC
|
||||
* Note: The last modified time of this file was set to
|
||||
* the last modified time of the source file after
|
||||
* generation to assist with modification tracking.
|
||||
*/
|
||||
package org.apache.jsp;
|
||||
|
||||
import javax.servlet.*;
|
||||
import javax.servlet.http.*;
|
||||
import javax.servlet.jsp.*;
|
||||
|
||||
public final class ognl_002dlab_jsp extends org.apache.jasper.runtime.HttpJspBase
|
||||
implements org.apache.jasper.runtime.JspSourceDependent,
|
||||
org.apache.jasper.runtime.JspSourceImports {
|
||||
|
||||
private static final javax.servlet.jsp.JspFactory _jspxFactory =
|
||||
javax.servlet.jsp.JspFactory.getDefaultFactory();
|
||||
|
||||
private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;
|
||||
|
||||
static {
|
||||
_jspx_dependants = new java.util.HashMap<java.lang.String,java.lang.Long>(2);
|
||||
_jspx_dependants.put("file:/home/llm/.m2/repository/org/apache/struts/struts2-core/6.4.0/struts2-core-6.4.0.jar", Long.valueOf(1772603570859L));
|
||||
_jspx_dependants.put("jar:file:/home/llm/.m2/repository/org/apache/struts/struts2-core/6.4.0/struts2-core-6.4.0.jar!/META-INF/struts-tags.tld", Long.valueOf(1712452520000L));
|
||||
}
|
||||
|
||||
private static final java.util.Set<java.lang.String> _jspx_imports_packages;
|
||||
|
||||
private static final java.util.Set<java.lang.String> _jspx_imports_classes;
|
||||
|
||||
static {
|
||||
_jspx_imports_packages = new java.util.HashSet<>();
|
||||
_jspx_imports_packages.add("javax.servlet");
|
||||
_jspx_imports_packages.add("javax.servlet.http");
|
||||
_jspx_imports_packages.add("javax.servlet.jsp");
|
||||
_jspx_imports_classes = null;
|
||||
}
|
||||
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fform_0026_005fmethod_005faction;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005flabel_005fnobody;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fcheckboxlist_0026_005fname_005flist_005flabel_005fnobody;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fdefault_005fnobody;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fiterator_0026_005fvar_005fvalue;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody;
|
||||
|
||||
private volatile javax.el.ExpressionFactory _el_expressionfactory;
|
||||
private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;
|
||||
|
||||
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
|
||||
return _jspx_dependants;
|
||||
}
|
||||
|
||||
public java.util.Set<java.lang.String> getPackageImports() {
|
||||
return _jspx_imports_packages;
|
||||
}
|
||||
|
||||
public java.util.Set<java.lang.String> getClassImports() {
|
||||
return _jspx_imports_classes;
|
||||
}
|
||||
|
||||
public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
|
||||
if (_el_expressionfactory == null) {
|
||||
synchronized (this) {
|
||||
if (_el_expressionfactory == null) {
|
||||
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
return _el_expressionfactory;
|
||||
}
|
||||
|
||||
public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
|
||||
if (_jsp_instancemanager == null) {
|
||||
synchronized (this) {
|
||||
if (_jsp_instancemanager == null) {
|
||||
_jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
|
||||
}
|
||||
}
|
||||
}
|
||||
return _jsp_instancemanager;
|
||||
}
|
||||
|
||||
public void _jspInit() {
|
||||
_005fjspx_005ftagPool_005fs_005fform_0026_005fmethod_005faction = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005flabel_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005fcheckboxlist_0026_005fname_005flist_005flabel_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fdefault_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005fiterator_0026_005fvar_005fvalue = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
}
|
||||
|
||||
public void _jspDestroy() {
|
||||
_005fjspx_005ftagPool_005fs_005fform_0026_005fmethod_005faction.release();
|
||||
_005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005flabel_005fnobody.release();
|
||||
_005fjspx_005ftagPool_005fs_005fcheckboxlist_0026_005fname_005flist_005flabel_005fnobody.release();
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fdefault_005fnobody.release();
|
||||
_005fjspx_005ftagPool_005fs_005fiterator_0026_005fvar_005fvalue.release();
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.release();
|
||||
}
|
||||
|
||||
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
|
||||
throws java.io.IOException, javax.servlet.ServletException {
|
||||
|
||||
final java.lang.String _jspx_method = request.getMethod();
|
||||
if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method) && !javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
|
||||
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET, POST or HEAD. Jasper also permits OPTIONS");
|
||||
return;
|
||||
}
|
||||
|
||||
final javax.servlet.jsp.PageContext pageContext;
|
||||
javax.servlet.http.HttpSession session = null;
|
||||
final javax.servlet.ServletContext application;
|
||||
final javax.servlet.ServletConfig config;
|
||||
javax.servlet.jsp.JspWriter out = null;
|
||||
final java.lang.Object page = this;
|
||||
javax.servlet.jsp.JspWriter _jspx_out = null;
|
||||
javax.servlet.jsp.PageContext _jspx_page_context = null;
|
||||
|
||||
|
||||
try {
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
pageContext = _jspxFactory.getPageContext(this, request, response,
|
||||
null, true, 8192, true);
|
||||
_jspx_page_context = pageContext;
|
||||
application = pageContext.getServletContext();
|
||||
config = pageContext.getServletConfig();
|
||||
session = pageContext.getSession();
|
||||
out = pageContext.getOut();
|
||||
_jspx_out = out;
|
||||
|
||||
out.write("\n");
|
||||
out.write("\n");
|
||||
out.write("<!DOCTYPE html>\n");
|
||||
out.write("<html>\n");
|
||||
out.write("<head>\n");
|
||||
out.write(" <meta charset=\"UTF-8\">\n");
|
||||
out.write(" <title>OGNL / 参数绑定实验室 - Struts2</title>\n");
|
||||
out.write(" <style>\n");
|
||||
out.write(" body { font-family: Arial, sans-serif; max-width: 1000px; margin: 40px auto; padding: 20px; background:#f7f8fa; }\n");
|
||||
out.write(" h1 { color:#8e44ad; }\n");
|
||||
out.write(" .card { background:#fff; border-radius:12px; padding:20px; margin:18px 0; box-shadow:0 4px 14px rgba(0,0,0,.06); }\n");
|
||||
out.write(" .lab { background:#fff7e6; border-left:4px solid #fa8c16; padding:15px; border-radius:8px; margin:20px 0; }\n");
|
||||
out.write(" .form-row { display:flex; gap:12px; flex-wrap:wrap; margin:10px 0; }\n");
|
||||
out.write(" input, select { padding:10px; min-width:180px; }\n");
|
||||
out.write(" button { background:#8e44ad; color:#fff; border:none; padding:10px 18px; border-radius:6px; cursor:pointer; }\n");
|
||||
out.write(" table { width:100%; border-collapse:collapse; margin-top:12px; }\n");
|
||||
out.write(" th, td { border:1px solid #ddd; padding:10px; text-align:left; }\n");
|
||||
out.write(" th { background:#8e44ad; color:white; }\n");
|
||||
out.write(" code { background:#f0f0f0; padding:2px 6px; border-radius:4px; }\n");
|
||||
out.write(" </style>\n");
|
||||
out.write("</head>\n");
|
||||
out.write("<body>\n");
|
||||
out.write(" <h1>🧪 OGNL / 参数绑定实验室</h1>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"lab\">\n");
|
||||
out.write(" <strong>实验任务卡</strong>\n");
|
||||
out.write(" <ul>\n");
|
||||
out.write(" <li>输入关键字和最小年龄,观察 Struts2 如何自动绑定请求参数到 Action 字段</li>\n");
|
||||
out.write(" <li>注意 <code>keyword</code>、<code>minAge</code>、<code>user.name</code> 这类命名会如何映射</li>\n");
|
||||
out.write(" <li>观察页面里 <code><s:property></code>、<code><s:iterator></code> 如何读取 Action 中的数据</li>\n");
|
||||
out.write(" </ul>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>参数过滤实验</h3>\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005fform_005f0(_jspx_page_context))
|
||||
return;
|
||||
out.write("\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>绑定结果观察</h3>\n");
|
||||
out.write(" <p>keyword = <code>");
|
||||
if (_jspx_meth_s_005fproperty_005f0(_jspx_page_context))
|
||||
return;
|
||||
out.write("</code></p>\n");
|
||||
out.write(" <p>minAge = <code>");
|
||||
if (_jspx_meth_s_005fproperty_005f1(_jspx_page_context))
|
||||
return;
|
||||
out.write("</code></p>\n");
|
||||
out.write(" <p>user.name = <code>");
|
||||
if (_jspx_meth_s_005fproperty_005f2(_jspx_page_context))
|
||||
return;
|
||||
out.write("</code></p>\n");
|
||||
out.write(" <p>tags = <code>");
|
||||
if (_jspx_meth_s_005fproperty_005f3(_jspx_page_context))
|
||||
return;
|
||||
out.write("</code></p>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>过滤后的用户列表</h3>\n");
|
||||
out.write(" <table>\n");
|
||||
out.write(" <tr><th>姓名</th><th>邮箱</th><th>年龄</th></tr>\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005fiterator_005f0(_jspx_page_context))
|
||||
return;
|
||||
out.write("\n");
|
||||
out.write(" </table>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>学习点</h3>\n");
|
||||
out.write(" <ul>\n");
|
||||
out.write(" <li><code>keyword</code> → 直接绑定到 Action 同名字段</li>\n");
|
||||
out.write(" <li><code>user.name</code> → 绑定到嵌套对象属性</li>\n");
|
||||
out.write(" <li><code>tags</code> → 多选值绑定到 <code>List<String></code></li>\n");
|
||||
out.write(" <li><code><s:iterator></code> 会遍历 Action 暴露出来的集合</li>\n");
|
||||
out.write(" </ul>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <p><a href=\"learn\">← 返回学习中心</a></p>\n");
|
||||
out.write("</body>\n");
|
||||
out.write("</html>\n");
|
||||
} catch (java.lang.Throwable t) {
|
||||
if (!(t instanceof javax.servlet.jsp.SkipPageException)){
|
||||
out = _jspx_out;
|
||||
if (out != null && out.getBufferSize() != 0)
|
||||
try {
|
||||
if (response.isCommitted()) {
|
||||
out.flush();
|
||||
} else {
|
||||
out.clearBuffer();
|
||||
}
|
||||
} catch (java.io.IOException e) {}
|
||||
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
|
||||
else throw new ServletException(t);
|
||||
}
|
||||
} finally {
|
||||
_jspxFactory.releasePageContext(_jspx_page_context);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fform_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:form
|
||||
org.apache.struts2.views.jsp.ui.FormTag _jspx_th_s_005fform_005f0 = (org.apache.struts2.views.jsp.ui.FormTag) _005fjspx_005ftagPool_005fs_005fform_0026_005fmethod_005faction.get(org.apache.struts2.views.jsp.ui.FormTag.class);
|
||||
boolean _jspx_th_s_005fform_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fform_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fform_005f0.setParent(null);
|
||||
// /ognl-lab.jsp(36,8) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fform_005f0.setAction("ognl_bind");
|
||||
// /ognl-lab.jsp(36,8) name = method type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fform_005f0.setMethod("post");
|
||||
int _jspx_eval_s_005fform_005f0 = _jspx_th_s_005fform_005f0.doStartTag();
|
||||
if (_jspx_eval_s_005fform_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
|
||||
if (_jspx_eval_s_005fform_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = org.apache.jasper.runtime.JspRuntimeLibrary.startBufferedBody(_jspx_page_context, _jspx_th_s_005fform_005f0);
|
||||
}
|
||||
do {
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"form-row\">\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005ftextfield_005f0(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005ftextfield_005f1(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" <div class=\"form-row\">\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005ftextfield_005f2(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005fcheckboxlist_005f0(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" <button type=\"submit\">执行绑定与过滤</button>\n");
|
||||
out.write(" ");
|
||||
int evalDoAfterBody = _jspx_th_s_005fform_005f0.doAfterBody();
|
||||
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
|
||||
break;
|
||||
} while (true);
|
||||
if (_jspx_eval_s_005fform_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = _jspx_page_context.popBody();
|
||||
}
|
||||
}
|
||||
if (_jspx_th_s_005fform_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fform_0026_005fmethod_005faction.reuse(_jspx_th_s_005fform_005f0);
|
||||
_jspx_th_s_005fform_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fform_005f0, _jsp_getInstanceManager(), _jspx_th_s_005fform_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005ftextfield_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:textfield
|
||||
org.apache.struts2.views.jsp.ui.TextFieldTag _jspx_th_s_005ftextfield_005f0 = (org.apache.struts2.views.jsp.ui.TextFieldTag) _005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005flabel_005fnobody.get(org.apache.struts2.views.jsp.ui.TextFieldTag.class);
|
||||
boolean _jspx_th_s_005ftextfield_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005ftextfield_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005ftextfield_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /ognl-lab.jsp(38,16) name = name type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ftextfield_005f0.setName("keyword");
|
||||
// /ognl-lab.jsp(38,16) name = label type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ftextfield_005f0.setLabel("关键字");
|
||||
// /ognl-lab.jsp(38,16) null
|
||||
_jspx_th_s_005ftextfield_005f0.setDynamicAttribute(null, "placeholder", "例如:张 / example");
|
||||
int _jspx_eval_s_005ftextfield_005f0 = _jspx_th_s_005ftextfield_005f0.doStartTag();
|
||||
if (_jspx_th_s_005ftextfield_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005flabel_005fnobody.reuse(_jspx_th_s_005ftextfield_005f0);
|
||||
_jspx_th_s_005ftextfield_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005ftextfield_005f0, _jsp_getInstanceManager(), _jspx_th_s_005ftextfield_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005ftextfield_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:textfield
|
||||
org.apache.struts2.views.jsp.ui.TextFieldTag _jspx_th_s_005ftextfield_005f1 = (org.apache.struts2.views.jsp.ui.TextFieldTag) _005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005flabel_005fnobody.get(org.apache.struts2.views.jsp.ui.TextFieldTag.class);
|
||||
boolean _jspx_th_s_005ftextfield_005f1_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005ftextfield_005f1.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005ftextfield_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /ognl-lab.jsp(39,16) name = name type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ftextfield_005f1.setName("minAge");
|
||||
// /ognl-lab.jsp(39,16) name = label type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ftextfield_005f1.setLabel("最小年龄");
|
||||
// /ognl-lab.jsp(39,16) null
|
||||
_jspx_th_s_005ftextfield_005f1.setDynamicAttribute(null, "placeholder", "例如:20");
|
||||
int _jspx_eval_s_005ftextfield_005f1 = _jspx_th_s_005ftextfield_005f1.doStartTag();
|
||||
if (_jspx_th_s_005ftextfield_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005flabel_005fnobody.reuse(_jspx_th_s_005ftextfield_005f1);
|
||||
_jspx_th_s_005ftextfield_005f1_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005ftextfield_005f1, _jsp_getInstanceManager(), _jspx_th_s_005ftextfield_005f1_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005ftextfield_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:textfield
|
||||
org.apache.struts2.views.jsp.ui.TextFieldTag _jspx_th_s_005ftextfield_005f2 = (org.apache.struts2.views.jsp.ui.TextFieldTag) _005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005flabel_005fnobody.get(org.apache.struts2.views.jsp.ui.TextFieldTag.class);
|
||||
boolean _jspx_th_s_005ftextfield_005f2_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005ftextfield_005f2.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005ftextfield_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /ognl-lab.jsp(42,16) name = name type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ftextfield_005f2.setName("user.name");
|
||||
// /ognl-lab.jsp(42,16) name = label type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ftextfield_005f2.setLabel("嵌套对象 user.name");
|
||||
// /ognl-lab.jsp(42,16) null
|
||||
_jspx_th_s_005ftextfield_005f2.setDynamicAttribute(null, "placeholder", "例如:测试用户");
|
||||
int _jspx_eval_s_005ftextfield_005f2 = _jspx_th_s_005ftextfield_005f2.doStartTag();
|
||||
if (_jspx_th_s_005ftextfield_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005flabel_005fnobody.reuse(_jspx_th_s_005ftextfield_005f2);
|
||||
_jspx_th_s_005ftextfield_005f2_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005ftextfield_005f2, _jsp_getInstanceManager(), _jspx_th_s_005ftextfield_005f2_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fcheckboxlist_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:checkboxlist
|
||||
org.apache.struts2.views.jsp.ui.CheckboxListTag _jspx_th_s_005fcheckboxlist_005f0 = (org.apache.struts2.views.jsp.ui.CheckboxListTag) _005fjspx_005ftagPool_005fs_005fcheckboxlist_0026_005fname_005flist_005flabel_005fnobody.get(org.apache.struts2.views.jsp.ui.CheckboxListTag.class);
|
||||
boolean _jspx_th_s_005fcheckboxlist_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fcheckboxlist_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fcheckboxlist_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /ognl-lab.jsp(43,16) name = name type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fcheckboxlist_005f0.setName("tags");
|
||||
// /ognl-lab.jsp(43,16) name = label type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fcheckboxlist_005f0.setLabel("兴趣标签");
|
||||
// /ognl-lab.jsp(43,16) name = list type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fcheckboxlist_005f0.setList("{'MVC','OGNL','Interceptor','JSP'}");
|
||||
int _jspx_eval_s_005fcheckboxlist_005f0 = _jspx_th_s_005fcheckboxlist_005f0.doStartTag();
|
||||
if (_jspx_th_s_005fcheckboxlist_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fcheckboxlist_0026_005fname_005flist_005flabel_005fnobody.reuse(_jspx_th_s_005fcheckboxlist_005f0);
|
||||
_jspx_th_s_005fcheckboxlist_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fcheckboxlist_005f0, _jsp_getInstanceManager(), _jspx_th_s_005fcheckboxlist_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f0 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fdefault_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f0.setParent(null);
|
||||
// /ognl-lab.jsp(51,27) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f0.setValue("keyword");
|
||||
// /ognl-lab.jsp(51,27) name = default type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f0.setDefault("(空)");
|
||||
int _jspx_eval_s_005fproperty_005f0 = _jspx_th_s_005fproperty_005f0.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fdefault_005fnobody.reuse(_jspx_th_s_005fproperty_005f0);
|
||||
_jspx_th_s_005fproperty_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f0, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f1(javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f1 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fdefault_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f1_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f1.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f1.setParent(null);
|
||||
// /ognl-lab.jsp(52,26) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f1.setValue("minAge");
|
||||
// /ognl-lab.jsp(52,26) name = default type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f1.setDefault("(空)");
|
||||
int _jspx_eval_s_005fproperty_005f1 = _jspx_th_s_005fproperty_005f1.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fdefault_005fnobody.reuse(_jspx_th_s_005fproperty_005f1);
|
||||
_jspx_th_s_005fproperty_005f1_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f1, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f1_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f2(javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f2 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fdefault_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f2_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f2.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f2.setParent(null);
|
||||
// /ognl-lab.jsp(53,29) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f2.setValue("user.name");
|
||||
// /ognl-lab.jsp(53,29) name = default type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f2.setDefault("(空)");
|
||||
int _jspx_eval_s_005fproperty_005f2 = _jspx_th_s_005fproperty_005f2.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fdefault_005fnobody.reuse(_jspx_th_s_005fproperty_005f2);
|
||||
_jspx_th_s_005fproperty_005f2_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f2, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f2_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f3(javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f3 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fdefault_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f3_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f3.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f3.setParent(null);
|
||||
// /ognl-lab.jsp(54,24) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f3.setValue("tags");
|
||||
// /ognl-lab.jsp(54,24) name = default type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f3.setDefault("[]");
|
||||
int _jspx_eval_s_005fproperty_005f3 = _jspx_th_s_005fproperty_005f3.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fdefault_005fnobody.reuse(_jspx_th_s_005fproperty_005f3);
|
||||
_jspx_th_s_005fproperty_005f3_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f3, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f3_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fiterator_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:iterator
|
||||
org.apache.struts2.views.jsp.IteratorTag _jspx_th_s_005fiterator_005f0 = (org.apache.struts2.views.jsp.IteratorTag) _005fjspx_005ftagPool_005fs_005fiterator_0026_005fvar_005fvalue.get(org.apache.struts2.views.jsp.IteratorTag.class);
|
||||
boolean _jspx_th_s_005fiterator_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fiterator_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fiterator_005f0.setParent(null);
|
||||
// /ognl-lab.jsp(61,12) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fiterator_005f0.setValue("filteredUsers");
|
||||
// /ognl-lab.jsp(61,12) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fiterator_005f0.setVar("u");
|
||||
int _jspx_eval_s_005fiterator_005f0 = _jspx_th_s_005fiterator_005f0.doStartTag();
|
||||
if (_jspx_eval_s_005fiterator_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
|
||||
if (_jspx_eval_s_005fiterator_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = org.apache.jasper.runtime.JspRuntimeLibrary.startBufferedBody(_jspx_page_context, _jspx_th_s_005fiterator_005f0);
|
||||
}
|
||||
do {
|
||||
out.write("\n");
|
||||
out.write(" <tr>\n");
|
||||
out.write(" <td>");
|
||||
if (_jspx_meth_s_005fproperty_005f4(_jspx_th_s_005fiterator_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("</td>\n");
|
||||
out.write(" <td>");
|
||||
if (_jspx_meth_s_005fproperty_005f5(_jspx_th_s_005fiterator_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("</td>\n");
|
||||
out.write(" <td>");
|
||||
if (_jspx_meth_s_005fproperty_005f6(_jspx_th_s_005fiterator_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("</td>\n");
|
||||
out.write(" </tr>\n");
|
||||
out.write(" ");
|
||||
int evalDoAfterBody = _jspx_th_s_005fiterator_005f0.doAfterBody();
|
||||
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
|
||||
break;
|
||||
} while (true);
|
||||
if (_jspx_eval_s_005fiterator_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = _jspx_page_context.popBody();
|
||||
}
|
||||
}
|
||||
if (_jspx_th_s_005fiterator_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fiterator_0026_005fvar_005fvalue.reuse(_jspx_th_s_005fiterator_005f0);
|
||||
_jspx_th_s_005fiterator_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fiterator_005f0, _jsp_getInstanceManager(), _jspx_th_s_005fiterator_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f4(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fiterator_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f4 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f4_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f4.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f4.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fiterator_005f0);
|
||||
// /ognl-lab.jsp(63,24) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f4.setValue("#u.name");
|
||||
int _jspx_eval_s_005fproperty_005f4 = _jspx_th_s_005fproperty_005f4.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f4.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f4);
|
||||
_jspx_th_s_005fproperty_005f4_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f4, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f4_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f5(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fiterator_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f5 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f5_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f5.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f5.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fiterator_005f0);
|
||||
// /ognl-lab.jsp(64,24) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f5.setValue("#u.email");
|
||||
int _jspx_eval_s_005fproperty_005f5 = _jspx_th_s_005fproperty_005f5.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f5.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f5);
|
||||
_jspx_th_s_005fproperty_005f5_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f5, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f5_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f6(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fiterator_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f6 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f6_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f6.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f6.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fiterator_005f0);
|
||||
// /ognl-lab.jsp(65,24) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f6.setValue("#u.age");
|
||||
int _jspx_eval_s_005fproperty_005f6 = _jspx_th_s_005fproperty_005f6.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f6.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f6);
|
||||
_jspx_th_s_005fproperty_005f6_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f6, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f6_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
BIN
target/tmp/jsp/org/apache/jsp/user_002dform_jsp.class
Normal file
BIN
target/tmp/jsp/org/apache/jsp/user_002dform_jsp.class
Normal file
Binary file not shown.
561
target/tmp/jsp/org/apache/jsp/user_002dform_jsp.java
Normal file
561
target/tmp/jsp/org/apache/jsp/user_002dform_jsp.java
Normal file
@@ -0,0 +1,561 @@
|
||||
/*
|
||||
* Generated by the Jasper component of Apache Tomcat
|
||||
* Version: jetty/9.4.54.v20240208
|
||||
* Generated at: 2026-03-12 22:22:06 UTC
|
||||
* Note: The last modified time of this file was set to
|
||||
* the last modified time of the source file after
|
||||
* generation to assist with modification tracking.
|
||||
*/
|
||||
package org.apache.jsp;
|
||||
|
||||
import javax.servlet.*;
|
||||
import javax.servlet.http.*;
|
||||
import javax.servlet.jsp.*;
|
||||
|
||||
public final class user_002dform_jsp extends org.apache.jasper.runtime.HttpJspBase
|
||||
implements org.apache.jasper.runtime.JspSourceDependent,
|
||||
org.apache.jasper.runtime.JspSourceImports {
|
||||
|
||||
private static final javax.servlet.jsp.JspFactory _jspxFactory =
|
||||
javax.servlet.jsp.JspFactory.getDefaultFactory();
|
||||
|
||||
private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;
|
||||
|
||||
static {
|
||||
_jspx_dependants = new java.util.HashMap<java.lang.String,java.lang.Long>(2);
|
||||
_jspx_dependants.put("file:/home/llm/.m2/repository/org/apache/struts/struts2-core/6.4.0/struts2-core-6.4.0.jar", Long.valueOf(1772603570859L));
|
||||
_jspx_dependants.put("jar:file:/home/llm/.m2/repository/org/apache/struts/struts2-core/6.4.0/struts2-core-6.4.0.jar!/META-INF/struts-tags.tld", Long.valueOf(1712452520000L));
|
||||
}
|
||||
|
||||
private static final java.util.Set<java.lang.String> _jspx_imports_packages;
|
||||
|
||||
private static final java.util.Set<java.lang.String> _jspx_imports_classes;
|
||||
|
||||
static {
|
||||
_jspx_imports_packages = new java.util.HashSet<>();
|
||||
_jspx_imports_packages.add("javax.servlet");
|
||||
_jspx_imports_packages.add("javax.servlet.http");
|
||||
_jspx_imports_packages.add("javax.servlet.jsp");
|
||||
_jspx_imports_classes = null;
|
||||
}
|
||||
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fif_0026_005ftest;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005felse;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fform_0026_005fmethod_005faction;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fhidden_0026_005fname_005fnobody;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005fnobody;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssStyle_005fnobody;
|
||||
|
||||
private volatile javax.el.ExpressionFactory _el_expressionfactory;
|
||||
private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;
|
||||
|
||||
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
|
||||
return _jspx_dependants;
|
||||
}
|
||||
|
||||
public java.util.Set<java.lang.String> getPackageImports() {
|
||||
return _jspx_imports_packages;
|
||||
}
|
||||
|
||||
public java.util.Set<java.lang.String> getClassImports() {
|
||||
return _jspx_imports_classes;
|
||||
}
|
||||
|
||||
public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
|
||||
if (_el_expressionfactory == null) {
|
||||
synchronized (this) {
|
||||
if (_el_expressionfactory == null) {
|
||||
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
return _el_expressionfactory;
|
||||
}
|
||||
|
||||
public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
|
||||
if (_jsp_instancemanager == null) {
|
||||
synchronized (this) {
|
||||
if (_jsp_instancemanager == null) {
|
||||
_jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
|
||||
}
|
||||
}
|
||||
}
|
||||
return _jsp_instancemanager;
|
||||
}
|
||||
|
||||
public void _jspInit() {
|
||||
_005fjspx_005ftagPool_005fs_005fif_0026_005ftest = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005felse = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005fform_0026_005fmethod_005faction = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005fhidden_0026_005fname_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssStyle_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
}
|
||||
|
||||
public void _jspDestroy() {
|
||||
_005fjspx_005ftagPool_005fs_005fif_0026_005ftest.release();
|
||||
_005fjspx_005ftagPool_005fs_005felse.release();
|
||||
_005fjspx_005ftagPool_005fs_005fform_0026_005fmethod_005faction.release();
|
||||
_005fjspx_005ftagPool_005fs_005fhidden_0026_005fname_005fnobody.release();
|
||||
_005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005fnobody.release();
|
||||
_005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssStyle_005fnobody.release();
|
||||
}
|
||||
|
||||
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
|
||||
throws java.io.IOException, javax.servlet.ServletException {
|
||||
|
||||
final java.lang.String _jspx_method = request.getMethod();
|
||||
if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method) && !javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
|
||||
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET, POST or HEAD. Jasper also permits OPTIONS");
|
||||
return;
|
||||
}
|
||||
|
||||
final javax.servlet.jsp.PageContext pageContext;
|
||||
javax.servlet.http.HttpSession session = null;
|
||||
final javax.servlet.ServletContext application;
|
||||
final javax.servlet.ServletConfig config;
|
||||
javax.servlet.jsp.JspWriter out = null;
|
||||
final java.lang.Object page = this;
|
||||
javax.servlet.jsp.JspWriter _jspx_out = null;
|
||||
javax.servlet.jsp.PageContext _jspx_page_context = null;
|
||||
|
||||
|
||||
try {
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
pageContext = _jspxFactory.getPageContext(this, request, response,
|
||||
null, true, 8192, true);
|
||||
_jspx_page_context = pageContext;
|
||||
application = pageContext.getServletContext();
|
||||
config = pageContext.getServletConfig();
|
||||
session = pageContext.getSession();
|
||||
out = pageContext.getOut();
|
||||
_jspx_out = out;
|
||||
|
||||
out.write("\n");
|
||||
out.write("\n");
|
||||
out.write("<!DOCTYPE html>\n");
|
||||
out.write("<html>\n");
|
||||
out.write("<head>\n");
|
||||
out.write(" <meta charset=\"UTF-8\">\n");
|
||||
out.write(" <title>用户表单 - Struts2</title>\n");
|
||||
out.write(" <style>\n");
|
||||
out.write(" body { font-family: Arial, sans-serif; max-width: 700px; margin: 40px auto; padding: 20px; background:#f7f8fa; }\n");
|
||||
out.write(" h1 { color: #e74c3c; }\n");
|
||||
out.write(" .form-group { margin: 15px 0; }\n");
|
||||
out.write(" label { display: block; margin-bottom: 5px; font-weight: bold; }\n");
|
||||
out.write(" input { width: 100%; padding: 10px; font-size: 14px; box-sizing: border-box; }\n");
|
||||
out.write(" button { background: #3498db; color: white; padding: 12px 24px; border: none; cursor: pointer; margin-top: 10px; border-radius:6px; }\n");
|
||||
out.write(" button:hover { background: #2980b9; }\n");
|
||||
out.write(" .lab, .tip { background:#fff; padding:15px; border-radius:10px; margin:18px 0; box-shadow:0 4px 14px rgba(0,0,0,.06); }\n");
|
||||
out.write(" .lab { background:#fff7e6; border-left:4px solid #fa8c16; }\n");
|
||||
out.write(" .quick { display:flex; gap:10px; flex-wrap:wrap; }\n");
|
||||
out.write(" .quick button { margin-top:0; }\n");
|
||||
out.write(" </style>\n");
|
||||
out.write("</head>\n");
|
||||
out.write("<body>\n");
|
||||
out.write(" <h1>");
|
||||
if (_jspx_meth_s_005fif_005f0(_jspx_page_context))
|
||||
return;
|
||||
if (_jspx_meth_s_005felse_005f0(_jspx_page_context))
|
||||
return;
|
||||
out.write("</h1>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"lab\">\n");
|
||||
out.write(" <strong>实验任务卡</strong>\n");
|
||||
out.write(" <ul>\n");
|
||||
out.write(" <li>试着新增一个完整用户,提交后观察为什么回到列表页</li>\n");
|
||||
out.write(" <li>再故意填一个不合理年龄,看当前脚手架是否已经做服务端校验</li>\n");
|
||||
out.write(" <li>思考:如果要做更严谨校验,你会把规则放在 Action、拦截器,还是 XML/注解里?</li>\n");
|
||||
out.write(" </ul>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"tip\">\n");
|
||||
out.write(" <strong>快速填充示例</strong>\n");
|
||||
out.write(" <div class=\"quick\">\n");
|
||||
out.write(" <button type=\"button\" onclick=\"fillExample('赵六','zhaoliu@example.com',26)\">填入正常示例</button>\n");
|
||||
out.write(" <button type=\"button\" onclick=\"fillExample('测试用户','bad-email',-1)\">填入异常示例</button>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" \n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005fform_005f0(_jspx_page_context))
|
||||
return;
|
||||
out.write("\n");
|
||||
out.write(" \n");
|
||||
out.write(" <div class=\"tip\">\n");
|
||||
out.write(" <strong>学习点</strong>\n");
|
||||
out.write(" <ul>\n");
|
||||
out.write(" <li>表单字段名 <code>user.name</code> / <code>user.email</code> / <code>user.age</code> 会映射到嵌套对象</li>\n");
|
||||
out.write(" <li>当进入编辑页时,Action 会先根据 <code>id</code> 找到已有对象并回填</li>\n");
|
||||
out.write(" <li>提交成功后通过 <code>redirectAction</code> 返回列表页,避免刷新重复提交</li>\n");
|
||||
out.write(" </ul>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" \n");
|
||||
out.write(" <p><a href=\"user\">← 返回用户列表</a></p>\n");
|
||||
out.write("\n");
|
||||
out.write(" <script>\n");
|
||||
out.write(" function fillExample(name, email, age) {\n");
|
||||
out.write(" const inputs = document.querySelectorAll('input[type=\"text\"]');\n");
|
||||
out.write(" if (inputs[0]) inputs[0].value = name;\n");
|
||||
out.write(" if (inputs[1]) inputs[1].value = email;\n");
|
||||
out.write(" if (inputs[2]) inputs[2].value = age;\n");
|
||||
out.write(" }\n");
|
||||
out.write(" </script>\n");
|
||||
out.write("</body>\n");
|
||||
out.write("</html>\n");
|
||||
} catch (java.lang.Throwable t) {
|
||||
if (!(t instanceof javax.servlet.jsp.SkipPageException)){
|
||||
out = _jspx_out;
|
||||
if (out != null && out.getBufferSize() != 0)
|
||||
try {
|
||||
if (response.isCommitted()) {
|
||||
out.flush();
|
||||
} else {
|
||||
out.clearBuffer();
|
||||
}
|
||||
} catch (java.io.IOException e) {}
|
||||
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
|
||||
else throw new ServletException(t);
|
||||
}
|
||||
} finally {
|
||||
_jspxFactory.releasePageContext(_jspx_page_context);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fif_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:if
|
||||
org.apache.struts2.views.jsp.IfTag _jspx_th_s_005fif_005f0 = (org.apache.struts2.views.jsp.IfTag) _005fjspx_005ftagPool_005fs_005fif_0026_005ftest.get(org.apache.struts2.views.jsp.IfTag.class);
|
||||
boolean _jspx_th_s_005fif_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fif_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fif_005f0.setParent(null);
|
||||
// /user-form.jsp(23,8) name = test type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fif_005f0.setTest("user.id == null");
|
||||
int _jspx_eval_s_005fif_005f0 = _jspx_th_s_005fif_005f0.doStartTag();
|
||||
if (_jspx_eval_s_005fif_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
|
||||
if (_jspx_eval_s_005fif_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = org.apache.jasper.runtime.JspRuntimeLibrary.startBufferedBody(_jspx_page_context, _jspx_th_s_005fif_005f0);
|
||||
}
|
||||
do {
|
||||
out.write("添加用户");
|
||||
int evalDoAfterBody = _jspx_th_s_005fif_005f0.doAfterBody();
|
||||
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
|
||||
break;
|
||||
} while (true);
|
||||
if (_jspx_eval_s_005fif_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = _jspx_page_context.popBody();
|
||||
}
|
||||
}
|
||||
if (_jspx_th_s_005fif_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fif_0026_005ftest.reuse(_jspx_th_s_005fif_005f0);
|
||||
_jspx_th_s_005fif_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fif_005f0, _jsp_getInstanceManager(), _jspx_th_s_005fif_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005felse_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:else
|
||||
org.apache.struts2.views.jsp.ElseTag _jspx_th_s_005felse_005f0 = (org.apache.struts2.views.jsp.ElseTag) _005fjspx_005ftagPool_005fs_005felse.get(org.apache.struts2.views.jsp.ElseTag.class);
|
||||
boolean _jspx_th_s_005felse_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005felse_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005felse_005f0.setParent(null);
|
||||
int _jspx_eval_s_005felse_005f0 = _jspx_th_s_005felse_005f0.doStartTag();
|
||||
if (_jspx_eval_s_005felse_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
|
||||
if (_jspx_eval_s_005felse_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = org.apache.jasper.runtime.JspRuntimeLibrary.startBufferedBody(_jspx_page_context, _jspx_th_s_005felse_005f0);
|
||||
}
|
||||
do {
|
||||
out.write("编辑用户");
|
||||
int evalDoAfterBody = _jspx_th_s_005felse_005f0.doAfterBody();
|
||||
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
|
||||
break;
|
||||
} while (true);
|
||||
if (_jspx_eval_s_005felse_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = _jspx_page_context.popBody();
|
||||
}
|
||||
}
|
||||
if (_jspx_th_s_005felse_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005felse.reuse(_jspx_th_s_005felse_005f0);
|
||||
_jspx_th_s_005felse_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005felse_005f0, _jsp_getInstanceManager(), _jspx_th_s_005felse_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fform_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:form
|
||||
org.apache.struts2.views.jsp.ui.FormTag _jspx_th_s_005fform_005f0 = (org.apache.struts2.views.jsp.ui.FormTag) _005fjspx_005ftagPool_005fs_005fform_0026_005fmethod_005faction.get(org.apache.struts2.views.jsp.ui.FormTag.class);
|
||||
boolean _jspx_th_s_005fform_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fform_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fform_005f0.setParent(null);
|
||||
// /user-form.jsp(42,4) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fform_005f0.setAction("%{user.id == null ? 'user_add' : 'user_update'}");
|
||||
// /user-form.jsp(42,4) name = method type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fform_005f0.setMethod("post");
|
||||
int _jspx_eval_s_005fform_005f0 = _jspx_th_s_005fform_005f0.doStartTag();
|
||||
if (_jspx_eval_s_005fform_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
|
||||
if (_jspx_eval_s_005fform_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = org.apache.jasper.runtime.JspRuntimeLibrary.startBufferedBody(_jspx_page_context, _jspx_th_s_005fform_005f0);
|
||||
}
|
||||
do {
|
||||
out.write("\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005fhidden_005f0(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" \n");
|
||||
out.write(" <div class=\"form-group\">\n");
|
||||
out.write(" <label>姓名:</label>\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005ftextfield_005f0(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005ffielderror_005f0(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" \n");
|
||||
out.write(" <div class=\"form-group\">\n");
|
||||
out.write(" <label>邮箱:</label>\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005ftextfield_005f1(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005ffielderror_005f1(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" \n");
|
||||
out.write(" <div class=\"form-group\">\n");
|
||||
out.write(" <label>年龄:</label>\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005ftextfield_005f2(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005ffielderror_005f2(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" \n");
|
||||
out.write(" <button type=\"submit\">保存</button>\n");
|
||||
out.write(" ");
|
||||
int evalDoAfterBody = _jspx_th_s_005fform_005f0.doAfterBody();
|
||||
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
|
||||
break;
|
||||
} while (true);
|
||||
if (_jspx_eval_s_005fform_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = _jspx_page_context.popBody();
|
||||
}
|
||||
}
|
||||
if (_jspx_th_s_005fform_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fform_0026_005fmethod_005faction.reuse(_jspx_th_s_005fform_005f0);
|
||||
_jspx_th_s_005fform_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fform_005f0, _jsp_getInstanceManager(), _jspx_th_s_005fform_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fhidden_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:hidden
|
||||
org.apache.struts2.views.jsp.ui.HiddenTag _jspx_th_s_005fhidden_005f0 = (org.apache.struts2.views.jsp.ui.HiddenTag) _005fjspx_005ftagPool_005fs_005fhidden_0026_005fname_005fnobody.get(org.apache.struts2.views.jsp.ui.HiddenTag.class);
|
||||
boolean _jspx_th_s_005fhidden_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fhidden_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fhidden_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /user-form.jsp(43,8) name = name type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fhidden_005f0.setName("user.id");
|
||||
int _jspx_eval_s_005fhidden_005f0 = _jspx_th_s_005fhidden_005f0.doStartTag();
|
||||
if (_jspx_th_s_005fhidden_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fhidden_0026_005fname_005fnobody.reuse(_jspx_th_s_005fhidden_005f0);
|
||||
_jspx_th_s_005fhidden_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fhidden_005f0, _jsp_getInstanceManager(), _jspx_th_s_005fhidden_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005ftextfield_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:textfield
|
||||
org.apache.struts2.views.jsp.ui.TextFieldTag _jspx_th_s_005ftextfield_005f0 = (org.apache.struts2.views.jsp.ui.TextFieldTag) _005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005fnobody.get(org.apache.struts2.views.jsp.ui.TextFieldTag.class);
|
||||
boolean _jspx_th_s_005ftextfield_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005ftextfield_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005ftextfield_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /user-form.jsp(47,12) name = name type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ftextfield_005f0.setName("user.name");
|
||||
// /user-form.jsp(47,12) null
|
||||
_jspx_th_s_005ftextfield_005f0.setDynamicAttribute(null, "placeholder", "请输入姓名");
|
||||
int _jspx_eval_s_005ftextfield_005f0 = _jspx_th_s_005ftextfield_005f0.doStartTag();
|
||||
if (_jspx_th_s_005ftextfield_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005fnobody.reuse(_jspx_th_s_005ftextfield_005f0);
|
||||
_jspx_th_s_005ftextfield_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005ftextfield_005f0, _jsp_getInstanceManager(), _jspx_th_s_005ftextfield_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005ffielderror_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:fielderror
|
||||
org.apache.struts2.views.jsp.ui.FieldErrorTag _jspx_th_s_005ffielderror_005f0 = (org.apache.struts2.views.jsp.ui.FieldErrorTag) _005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssStyle_005fnobody.get(org.apache.struts2.views.jsp.ui.FieldErrorTag.class);
|
||||
boolean _jspx_th_s_005ffielderror_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005ffielderror_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005ffielderror_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /user-form.jsp(48,12) name = fieldName type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ffielderror_005f0.setFieldName("user.name");
|
||||
// /user-form.jsp(48,12) name = cssStyle type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ffielderror_005f0.setCssStyle("color:#e74c3c;font-size:12px;");
|
||||
int _jspx_eval_s_005ffielderror_005f0 = _jspx_th_s_005ffielderror_005f0.doStartTag();
|
||||
if (_jspx_th_s_005ffielderror_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssStyle_005fnobody.reuse(_jspx_th_s_005ffielderror_005f0);
|
||||
_jspx_th_s_005ffielderror_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005ffielderror_005f0, _jsp_getInstanceManager(), _jspx_th_s_005ffielderror_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005ftextfield_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:textfield
|
||||
org.apache.struts2.views.jsp.ui.TextFieldTag _jspx_th_s_005ftextfield_005f1 = (org.apache.struts2.views.jsp.ui.TextFieldTag) _005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005fnobody.get(org.apache.struts2.views.jsp.ui.TextFieldTag.class);
|
||||
boolean _jspx_th_s_005ftextfield_005f1_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005ftextfield_005f1.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005ftextfield_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /user-form.jsp(53,12) name = name type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ftextfield_005f1.setName("user.email");
|
||||
// /user-form.jsp(53,12) null
|
||||
_jspx_th_s_005ftextfield_005f1.setDynamicAttribute(null, "placeholder", "请输入邮箱");
|
||||
int _jspx_eval_s_005ftextfield_005f1 = _jspx_th_s_005ftextfield_005f1.doStartTag();
|
||||
if (_jspx_th_s_005ftextfield_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005fnobody.reuse(_jspx_th_s_005ftextfield_005f1);
|
||||
_jspx_th_s_005ftextfield_005f1_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005ftextfield_005f1, _jsp_getInstanceManager(), _jspx_th_s_005ftextfield_005f1_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005ffielderror_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:fielderror
|
||||
org.apache.struts2.views.jsp.ui.FieldErrorTag _jspx_th_s_005ffielderror_005f1 = (org.apache.struts2.views.jsp.ui.FieldErrorTag) _005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssStyle_005fnobody.get(org.apache.struts2.views.jsp.ui.FieldErrorTag.class);
|
||||
boolean _jspx_th_s_005ffielderror_005f1_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005ffielderror_005f1.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005ffielderror_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /user-form.jsp(54,12) name = fieldName type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ffielderror_005f1.setFieldName("user.email");
|
||||
// /user-form.jsp(54,12) name = cssStyle type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ffielderror_005f1.setCssStyle("color:#e74c3c;font-size:12px;");
|
||||
int _jspx_eval_s_005ffielderror_005f1 = _jspx_th_s_005ffielderror_005f1.doStartTag();
|
||||
if (_jspx_th_s_005ffielderror_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssStyle_005fnobody.reuse(_jspx_th_s_005ffielderror_005f1);
|
||||
_jspx_th_s_005ffielderror_005f1_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005ffielderror_005f1, _jsp_getInstanceManager(), _jspx_th_s_005ffielderror_005f1_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005ftextfield_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:textfield
|
||||
org.apache.struts2.views.jsp.ui.TextFieldTag _jspx_th_s_005ftextfield_005f2 = (org.apache.struts2.views.jsp.ui.TextFieldTag) _005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005fnobody.get(org.apache.struts2.views.jsp.ui.TextFieldTag.class);
|
||||
boolean _jspx_th_s_005ftextfield_005f2_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005ftextfield_005f2.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005ftextfield_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /user-form.jsp(59,12) name = name type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ftextfield_005f2.setName("user.age");
|
||||
// /user-form.jsp(59,12) null
|
||||
_jspx_th_s_005ftextfield_005f2.setDynamicAttribute(null, "placeholder", "请输入年龄");
|
||||
int _jspx_eval_s_005ftextfield_005f2 = _jspx_th_s_005ftextfield_005f2.doStartTag();
|
||||
if (_jspx_th_s_005ftextfield_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005ftextfield_0026_005fplaceholder_005fname_005fnobody.reuse(_jspx_th_s_005ftextfield_005f2);
|
||||
_jspx_th_s_005ftextfield_005f2_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005ftextfield_005f2, _jsp_getInstanceManager(), _jspx_th_s_005ftextfield_005f2_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005ffielderror_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:fielderror
|
||||
org.apache.struts2.views.jsp.ui.FieldErrorTag _jspx_th_s_005ffielderror_005f2 = (org.apache.struts2.views.jsp.ui.FieldErrorTag) _005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssStyle_005fnobody.get(org.apache.struts2.views.jsp.ui.FieldErrorTag.class);
|
||||
boolean _jspx_th_s_005ffielderror_005f2_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005ffielderror_005f2.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005ffielderror_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /user-form.jsp(60,12) name = fieldName type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ffielderror_005f2.setFieldName("user.age");
|
||||
// /user-form.jsp(60,12) name = cssStyle type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ffielderror_005f2.setCssStyle("color:#e74c3c;font-size:12px;");
|
||||
int _jspx_eval_s_005ffielderror_005f2 = _jspx_th_s_005ffielderror_005f2.doStartTag();
|
||||
if (_jspx_th_s_005ffielderror_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssStyle_005fnobody.reuse(_jspx_th_s_005ffielderror_005f2);
|
||||
_jspx_th_s_005ffielderror_005f2_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005ffielderror_005f2, _jsp_getInstanceManager(), _jspx_th_s_005ffielderror_005f2_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
BIN
target/tmp/jsp/org/apache/jsp/user_002dlist_jsp.class
Normal file
BIN
target/tmp/jsp/org/apache/jsp/user_002dlist_jsp.class
Normal file
Binary file not shown.
453
target/tmp/jsp/org/apache/jsp/user_002dlist_jsp.java
Normal file
453
target/tmp/jsp/org/apache/jsp/user_002dlist_jsp.java
Normal file
@@ -0,0 +1,453 @@
|
||||
/*
|
||||
* Generated by the Jasper component of Apache Tomcat
|
||||
* Version: jetty/9.4.54.v20240208
|
||||
* Generated at: 2026-03-12 11:40:06 UTC
|
||||
* Note: The last modified time of this file was set to
|
||||
* the last modified time of the source file after
|
||||
* generation to assist with modification tracking.
|
||||
*/
|
||||
package org.apache.jsp;
|
||||
|
||||
import javax.servlet.*;
|
||||
import javax.servlet.http.*;
|
||||
import javax.servlet.jsp.*;
|
||||
|
||||
public final class user_002dlist_jsp extends org.apache.jasper.runtime.HttpJspBase
|
||||
implements org.apache.jasper.runtime.JspSourceDependent,
|
||||
org.apache.jasper.runtime.JspSourceImports {
|
||||
|
||||
private static final javax.servlet.jsp.JspFactory _jspxFactory =
|
||||
javax.servlet.jsp.JspFactory.getDefaultFactory();
|
||||
|
||||
private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;
|
||||
|
||||
static {
|
||||
_jspx_dependants = new java.util.HashMap<java.lang.String,java.lang.Long>(2);
|
||||
_jspx_dependants.put("file:/home/llm/.m2/repository/org/apache/struts/struts2-core/6.4.0/struts2-core-6.4.0.jar", Long.valueOf(1772603570859L));
|
||||
_jspx_dependants.put("jar:file:/home/llm/.m2/repository/org/apache/struts/struts2-core/6.4.0/struts2-core-6.4.0.jar!/META-INF/struts-tags.tld", Long.valueOf(1712452520000L));
|
||||
}
|
||||
|
||||
private static final java.util.Set<java.lang.String> _jspx_imports_packages;
|
||||
|
||||
private static final java.util.Set<java.lang.String> _jspx_imports_classes;
|
||||
|
||||
static {
|
||||
_jspx_imports_packages = new java.util.HashSet<>();
|
||||
_jspx_imports_packages.add("javax.servlet");
|
||||
_jspx_imports_packages.add("javax.servlet.http");
|
||||
_jspx_imports_packages.add("javax.servlet.jsp");
|
||||
_jspx_imports_classes = null;
|
||||
}
|
||||
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fiterator_0026_005fvar_005fvalue;
|
||||
|
||||
private volatile javax.el.ExpressionFactory _el_expressionfactory;
|
||||
private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;
|
||||
|
||||
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
|
||||
return _jspx_dependants;
|
||||
}
|
||||
|
||||
public java.util.Set<java.lang.String> getPackageImports() {
|
||||
return _jspx_imports_packages;
|
||||
}
|
||||
|
||||
public java.util.Set<java.lang.String> getClassImports() {
|
||||
return _jspx_imports_classes;
|
||||
}
|
||||
|
||||
public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
|
||||
if (_el_expressionfactory == null) {
|
||||
synchronized (this) {
|
||||
if (_el_expressionfactory == null) {
|
||||
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
return _el_expressionfactory;
|
||||
}
|
||||
|
||||
public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
|
||||
if (_jsp_instancemanager == null) {
|
||||
synchronized (this) {
|
||||
if (_jsp_instancemanager == null) {
|
||||
_jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
|
||||
}
|
||||
}
|
||||
}
|
||||
return _jsp_instancemanager;
|
||||
}
|
||||
|
||||
public void _jspInit() {
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005fiterator_0026_005fvar_005fvalue = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
}
|
||||
|
||||
public void _jspDestroy() {
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.release();
|
||||
_005fjspx_005ftagPool_005fs_005fiterator_0026_005fvar_005fvalue.release();
|
||||
}
|
||||
|
||||
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
|
||||
throws java.io.IOException, javax.servlet.ServletException {
|
||||
|
||||
final java.lang.String _jspx_method = request.getMethod();
|
||||
if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method) && !javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
|
||||
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET, POST or HEAD. Jasper also permits OPTIONS");
|
||||
return;
|
||||
}
|
||||
|
||||
final javax.servlet.jsp.PageContext pageContext;
|
||||
javax.servlet.http.HttpSession session = null;
|
||||
final javax.servlet.ServletContext application;
|
||||
final javax.servlet.ServletConfig config;
|
||||
javax.servlet.jsp.JspWriter out = null;
|
||||
final java.lang.Object page = this;
|
||||
javax.servlet.jsp.JspWriter _jspx_out = null;
|
||||
javax.servlet.jsp.PageContext _jspx_page_context = null;
|
||||
|
||||
|
||||
try {
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
pageContext = _jspxFactory.getPageContext(this, request, response,
|
||||
null, true, 8192, true);
|
||||
_jspx_page_context = pageContext;
|
||||
application = pageContext.getServletContext();
|
||||
config = pageContext.getServletConfig();
|
||||
session = pageContext.getSession();
|
||||
out = pageContext.getOut();
|
||||
_jspx_out = out;
|
||||
|
||||
out.write("\n");
|
||||
out.write("\n");
|
||||
out.write("<!DOCTYPE html>\n");
|
||||
out.write("<html>\n");
|
||||
out.write("<head>\n");
|
||||
out.write(" <meta charset=\"UTF-8\">\n");
|
||||
out.write(" <title>用户管理 - Struts2 CRUD 示例</title>\n");
|
||||
out.write(" <style>\n");
|
||||
out.write(" body { font-family: Arial, sans-serif; max-width: 1000px; margin: 40px auto; padding: 20px; background:#f7f8fa; }\n");
|
||||
out.write(" h1 { color: #e74c3c; }\n");
|
||||
out.write(" table { width: 100%; border-collapse: collapse; margin: 20px 0; background:#fff; }\n");
|
||||
out.write(" th, td { border: 1px solid #ddd; padding: 12px; text-align: left; }\n");
|
||||
out.write(" th { background: #3498db; color: white; }\n");
|
||||
out.write(" tr:nth-child(even) { background: #f9f9f9; }\n");
|
||||
out.write(" .btn { padding: 6px 12px; text-decoration: none; border-radius: 4px; margin-right: 5px; display:inline-block; }\n");
|
||||
out.write(" .btn-edit { background: #f39c12; color: white; }\n");
|
||||
out.write(" .btn-delete { background: #e74c3c; color: white; }\n");
|
||||
out.write(" .btn-add { background: #2ecc71; color: white; padding: 10px 20px; }\n");
|
||||
out.write(" .tip, .lab { background: #fff; padding: 15px; border-radius: 10px; margin: 20px 0; box-shadow:0 4px 14px rgba(0,0,0,.06); }\n");
|
||||
out.write(" .lab { border-left: 4px solid #fa8c16; background:#fff7e6; }\n");
|
||||
out.write(" .stats { display:flex; gap:12px; flex-wrap:wrap; margin:15px 0; }\n");
|
||||
out.write(" .stat { background:#fff; padding:14px 18px; border-radius:10px; box-shadow:0 4px 14px rgba(0,0,0,.06); min-width:160px; }\n");
|
||||
out.write(" .stat strong { display:block; font-size:1.4em; color:#3498db; }\n");
|
||||
out.write(" code { background:#f0f0f0; padding:2px 6px; border-radius:4px; }\n");
|
||||
out.write(" </style>\n");
|
||||
out.write("</head>\n");
|
||||
out.write("<body>\n");
|
||||
out.write(" <h1>👥 用户管理 - Struts2 CRUD 示例</h1>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"lab\">\n");
|
||||
out.write(" <strong>实验任务卡</strong>\n");
|
||||
out.write(" <ul>\n");
|
||||
out.write(" <li>先新增一个用户,观察表单提交后为什么会回到列表页</li>\n");
|
||||
out.write(" <li>再编辑一个用户,体会 Struts2 如何把已有数据回填到表单</li>\n");
|
||||
out.write(" <li>最后删除一个用户,理解 <code>redirectAction</code> 的使用场景</li>\n");
|
||||
out.write(" </ul>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"stats\">\n");
|
||||
out.write(" <div class=\"stat\"><span>当前用户数</span><strong>");
|
||||
if (_jspx_meth_s_005fproperty_005f0(_jspx_page_context))
|
||||
return;
|
||||
out.write("</strong></div>\n");
|
||||
out.write(" <div class=\"stat\"><span>演示模式</span><strong>内存列表</strong></div>\n");
|
||||
out.write(" <div class=\"stat\"><span>学习重点</span><strong>CRUD 流程</strong></div>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" \n");
|
||||
out.write(" <p><a class=\"btn btn-add\" href=\"user_edit\">+ 添加用户</a></p>\n");
|
||||
out.write(" \n");
|
||||
out.write(" <table>\n");
|
||||
out.write(" <tr>\n");
|
||||
out.write(" <th>ID</th>\n");
|
||||
out.write(" <th>姓名</th>\n");
|
||||
out.write(" <th>邮箱</th>\n");
|
||||
out.write(" <th>年龄</th>\n");
|
||||
out.write(" <th>操作</th>\n");
|
||||
out.write(" </tr>\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005fiterator_005f0(_jspx_page_context))
|
||||
return;
|
||||
out.write("\n");
|
||||
out.write(" </table>\n");
|
||||
out.write(" \n");
|
||||
out.write(" <div class=\"tip\">\n");
|
||||
out.write(" <strong>学习点</strong>\n");
|
||||
out.write(" <ul>\n");
|
||||
out.write(" <li><code><s:iterator></code> 遍历集合</li>\n");
|
||||
out.write(" <li><code>redirectAction</code> 结果类型实现 PRG 模式</li>\n");
|
||||
out.write(" <li>同一个 Action 通过不同 method 处理 list/add/edit/update/delete</li>\n");
|
||||
out.write(" <li>这里的数据存在内存里,重启后会恢复初始样本</li>\n");
|
||||
out.write(" </ul>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" \n");
|
||||
out.write(" <p><a href=\"learn\">← 返回学习中心</a></p>\n");
|
||||
out.write("</body>\n");
|
||||
out.write("</html>\n");
|
||||
} catch (java.lang.Throwable t) {
|
||||
if (!(t instanceof javax.servlet.jsp.SkipPageException)){
|
||||
out = _jspx_out;
|
||||
if (out != null && out.getBufferSize() != 0)
|
||||
try {
|
||||
if (response.isCommitted()) {
|
||||
out.flush();
|
||||
} else {
|
||||
out.clearBuffer();
|
||||
}
|
||||
} catch (java.io.IOException e) {}
|
||||
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
|
||||
else throw new ServletException(t);
|
||||
}
|
||||
} finally {
|
||||
_jspxFactory.releasePageContext(_jspx_page_context);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f0 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f0.setParent(null);
|
||||
// /user-list.jsp(40,52) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f0.setValue("userList.size()");
|
||||
int _jspx_eval_s_005fproperty_005f0 = _jspx_th_s_005fproperty_005f0.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f0);
|
||||
_jspx_th_s_005fproperty_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f0, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fiterator_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:iterator
|
||||
org.apache.struts2.views.jsp.IteratorTag _jspx_th_s_005fiterator_005f0 = (org.apache.struts2.views.jsp.IteratorTag) _005fjspx_005ftagPool_005fs_005fiterator_0026_005fvar_005fvalue.get(org.apache.struts2.views.jsp.IteratorTag.class);
|
||||
boolean _jspx_th_s_005fiterator_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fiterator_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fiterator_005f0.setParent(null);
|
||||
// /user-list.jsp(55,8) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fiterator_005f0.setValue("userList");
|
||||
// /user-list.jsp(55,8) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fiterator_005f0.setVar("u");
|
||||
int _jspx_eval_s_005fiterator_005f0 = _jspx_th_s_005fiterator_005f0.doStartTag();
|
||||
if (_jspx_eval_s_005fiterator_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
|
||||
if (_jspx_eval_s_005fiterator_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = org.apache.jasper.runtime.JspRuntimeLibrary.startBufferedBody(_jspx_page_context, _jspx_th_s_005fiterator_005f0);
|
||||
}
|
||||
do {
|
||||
out.write("\n");
|
||||
out.write(" <tr>\n");
|
||||
out.write(" <td>");
|
||||
if (_jspx_meth_s_005fproperty_005f1(_jspx_th_s_005fiterator_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("</td>\n");
|
||||
out.write(" <td>");
|
||||
if (_jspx_meth_s_005fproperty_005f2(_jspx_th_s_005fiterator_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("</td>\n");
|
||||
out.write(" <td>");
|
||||
if (_jspx_meth_s_005fproperty_005f3(_jspx_th_s_005fiterator_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("</td>\n");
|
||||
out.write(" <td>");
|
||||
if (_jspx_meth_s_005fproperty_005f4(_jspx_th_s_005fiterator_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("</td>\n");
|
||||
out.write(" <td>\n");
|
||||
out.write(" <a class=\"btn btn-edit\" href=\"user_edit?id=");
|
||||
if (_jspx_meth_s_005fproperty_005f5(_jspx_th_s_005fiterator_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\">编辑</a>\n");
|
||||
out.write(" <a class=\"btn btn-delete\" href=\"user_delete?id=");
|
||||
if (_jspx_meth_s_005fproperty_005f6(_jspx_th_s_005fiterator_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\" onclick=\"return confirm('确定删除?')\">删除</a>\n");
|
||||
out.write(" </td>\n");
|
||||
out.write(" </tr>\n");
|
||||
out.write(" ");
|
||||
int evalDoAfterBody = _jspx_th_s_005fiterator_005f0.doAfterBody();
|
||||
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
|
||||
break;
|
||||
} while (true);
|
||||
if (_jspx_eval_s_005fiterator_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = _jspx_page_context.popBody();
|
||||
}
|
||||
}
|
||||
if (_jspx_th_s_005fiterator_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fiterator_0026_005fvar_005fvalue.reuse(_jspx_th_s_005fiterator_005f0);
|
||||
_jspx_th_s_005fiterator_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fiterator_005f0, _jsp_getInstanceManager(), _jspx_th_s_005fiterator_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fiterator_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f1 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f1_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f1.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fiterator_005f0);
|
||||
// /user-list.jsp(57,20) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f1.setValue("#u.id");
|
||||
int _jspx_eval_s_005fproperty_005f1 = _jspx_th_s_005fproperty_005f1.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f1);
|
||||
_jspx_th_s_005fproperty_005f1_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f1, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f1_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fiterator_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f2 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f2_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f2.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fiterator_005f0);
|
||||
// /user-list.jsp(58,20) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f2.setValue("#u.name");
|
||||
int _jspx_eval_s_005fproperty_005f2 = _jspx_th_s_005fproperty_005f2.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f2);
|
||||
_jspx_th_s_005fproperty_005f2_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f2, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f2_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f3(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fiterator_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f3 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f3_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f3.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f3.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fiterator_005f0);
|
||||
// /user-list.jsp(59,20) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f3.setValue("#u.email");
|
||||
int _jspx_eval_s_005fproperty_005f3 = _jspx_th_s_005fproperty_005f3.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f3);
|
||||
_jspx_th_s_005fproperty_005f3_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f3, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f3_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f4(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fiterator_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f4 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f4_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f4.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f4.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fiterator_005f0);
|
||||
// /user-list.jsp(60,20) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f4.setValue("#u.age");
|
||||
int _jspx_eval_s_005fproperty_005f4 = _jspx_th_s_005fproperty_005f4.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f4.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f4);
|
||||
_jspx_th_s_005fproperty_005f4_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f4, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f4_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f5(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fiterator_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f5 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f5_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f5.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f5.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fiterator_005f0);
|
||||
// /user-list.jsp(62,63) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f5.setValue("#u.id");
|
||||
int _jspx_eval_s_005fproperty_005f5 = _jspx_th_s_005fproperty_005f5.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f5.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f5);
|
||||
_jspx_th_s_005fproperty_005f5_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f5, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f5_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f6(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fiterator_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f6 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f6_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f6.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f6.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fiterator_005f0);
|
||||
// /user-list.jsp(63,67) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f6.setValue("#u.id");
|
||||
int _jspx_eval_s_005fproperty_005f6 = _jspx_th_s_005fproperty_005f6.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f6.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f6);
|
||||
_jspx_th_s_005fproperty_005f6_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f6, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f6_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
BIN
target/tmp/jsp/org/apache/jsp/validation_002dlab_jsp.class
Normal file
BIN
target/tmp/jsp/org/apache/jsp/validation_002dlab_jsp.class
Normal file
Binary file not shown.
514
target/tmp/jsp/org/apache/jsp/validation_002dlab_jsp.java
Normal file
514
target/tmp/jsp/org/apache/jsp/validation_002dlab_jsp.java
Normal file
@@ -0,0 +1,514 @@
|
||||
/*
|
||||
* Generated by the Jasper component of Apache Tomcat
|
||||
* Version: jetty/9.4.54.v20240208
|
||||
* Generated at: 2026-03-12 22:22:01 UTC
|
||||
* Note: The last modified time of this file was set to
|
||||
* the last modified time of the source file after
|
||||
* generation to assist with modification tracking.
|
||||
*/
|
||||
package org.apache.jsp;
|
||||
|
||||
import javax.servlet.*;
|
||||
import javax.servlet.http.*;
|
||||
import javax.servlet.jsp.*;
|
||||
|
||||
public final class validation_002dlab_jsp extends org.apache.jasper.runtime.HttpJspBase
|
||||
implements org.apache.jasper.runtime.JspSourceDependent,
|
||||
org.apache.jasper.runtime.JspSourceImports {
|
||||
|
||||
private static final javax.servlet.jsp.JspFactory _jspxFactory =
|
||||
javax.servlet.jsp.JspFactory.getDefaultFactory();
|
||||
|
||||
private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;
|
||||
|
||||
static {
|
||||
_jspx_dependants = new java.util.HashMap<java.lang.String,java.lang.Long>(2);
|
||||
_jspx_dependants.put("file:/home/llm/.m2/repository/org/apache/struts/struts2-core/6.4.0/struts2-core-6.4.0.jar", Long.valueOf(1772603570859L));
|
||||
_jspx_dependants.put("jar:file:/home/llm/.m2/repository/org/apache/struts/struts2-core/6.4.0/struts2-core-6.4.0.jar!/META-INF/struts-tags.tld", Long.valueOf(1712452520000L));
|
||||
}
|
||||
|
||||
private static final java.util.Set<java.lang.String> _jspx_imports_packages;
|
||||
|
||||
private static final java.util.Set<java.lang.String> _jspx_imports_classes;
|
||||
|
||||
static {
|
||||
_jspx_imports_packages = new java.util.HashSet<>();
|
||||
_jspx_imports_packages.add("javax.servlet");
|
||||
_jspx_imports_packages.add("javax.servlet.http");
|
||||
_jspx_imports_packages.add("javax.servlet.jsp");
|
||||
_jspx_imports_classes = null;
|
||||
}
|
||||
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fif_0026_005ftest;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fform_0026_005fmethod_005faction;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005ftextfield_0026_005fname_005fnobody;
|
||||
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssStyle_005fnobody;
|
||||
|
||||
private volatile javax.el.ExpressionFactory _el_expressionfactory;
|
||||
private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;
|
||||
|
||||
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
|
||||
return _jspx_dependants;
|
||||
}
|
||||
|
||||
public java.util.Set<java.lang.String> getPackageImports() {
|
||||
return _jspx_imports_packages;
|
||||
}
|
||||
|
||||
public java.util.Set<java.lang.String> getClassImports() {
|
||||
return _jspx_imports_classes;
|
||||
}
|
||||
|
||||
public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
|
||||
if (_el_expressionfactory == null) {
|
||||
synchronized (this) {
|
||||
if (_el_expressionfactory == null) {
|
||||
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
return _el_expressionfactory;
|
||||
}
|
||||
|
||||
public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
|
||||
if (_jsp_instancemanager == null) {
|
||||
synchronized (this) {
|
||||
if (_jsp_instancemanager == null) {
|
||||
_jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
|
||||
}
|
||||
}
|
||||
}
|
||||
return _jsp_instancemanager;
|
||||
}
|
||||
|
||||
public void _jspInit() {
|
||||
_005fjspx_005ftagPool_005fs_005fif_0026_005ftest = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005fform_0026_005fmethod_005faction = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005ftextfield_0026_005fname_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
_005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssStyle_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
|
||||
}
|
||||
|
||||
public void _jspDestroy() {
|
||||
_005fjspx_005ftagPool_005fs_005fif_0026_005ftest.release();
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.release();
|
||||
_005fjspx_005ftagPool_005fs_005fform_0026_005fmethod_005faction.release();
|
||||
_005fjspx_005ftagPool_005fs_005ftextfield_0026_005fname_005fnobody.release();
|
||||
_005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssStyle_005fnobody.release();
|
||||
}
|
||||
|
||||
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
|
||||
throws java.io.IOException, javax.servlet.ServletException {
|
||||
|
||||
final java.lang.String _jspx_method = request.getMethod();
|
||||
if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method) && !javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
|
||||
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET, POST or HEAD. Jasper also permits OPTIONS");
|
||||
return;
|
||||
}
|
||||
|
||||
final javax.servlet.jsp.PageContext pageContext;
|
||||
javax.servlet.http.HttpSession session = null;
|
||||
final javax.servlet.ServletContext application;
|
||||
final javax.servlet.ServletConfig config;
|
||||
javax.servlet.jsp.JspWriter out = null;
|
||||
final java.lang.Object page = this;
|
||||
javax.servlet.jsp.JspWriter _jspx_out = null;
|
||||
javax.servlet.jsp.PageContext _jspx_page_context = null;
|
||||
|
||||
|
||||
try {
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
pageContext = _jspxFactory.getPageContext(this, request, response,
|
||||
null, true, 8192, true);
|
||||
_jspx_page_context = pageContext;
|
||||
application = pageContext.getServletContext();
|
||||
config = pageContext.getServletConfig();
|
||||
session = pageContext.getSession();
|
||||
out = pageContext.getOut();
|
||||
_jspx_out = out;
|
||||
|
||||
out.write("\n");
|
||||
out.write("\n");
|
||||
out.write("<!DOCTYPE html>\n");
|
||||
out.write("<html>\n");
|
||||
out.write("<head>\n");
|
||||
out.write(" <meta charset=\"UTF-8\">\n");
|
||||
out.write(" <title>验证与错误流实验室 - Struts2</title>\n");
|
||||
out.write(" <style>\n");
|
||||
out.write(" body { font-family: Arial, sans-serif; max-width: 900px; margin: 40px auto; padding: 20px; background:#f7f8fa; }\n");
|
||||
out.write(" h1 { color:#c0392b; }\n");
|
||||
out.write(" .card { background:#fff; border-radius:12px; padding:20px; margin:18px 0; box-shadow:0 4px 14px rgba(0,0,0,.06); }\n");
|
||||
out.write(" .lab { background:#fff7e6; border-left:4px solid #fa8c16; padding:15px; border-radius:8px; margin:20px 0; }\n");
|
||||
out.write(" .quick { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:12px; }\n");
|
||||
out.write(" button { background:#c0392b; color:white; border:none; padding:10px 16px; border-radius:6px; cursor:pointer; }\n");
|
||||
out.write(" input { padding:10px; width:100%; box-sizing:border-box; }\n");
|
||||
out.write(" .field { margin:12px 0; }\n");
|
||||
out.write(" .ok { background:#eafaf1; color:#1e8449; padding:12px; border-radius:8px; }\n");
|
||||
out.write(" </style>\n");
|
||||
out.write("</head>\n");
|
||||
out.write("<body>\n");
|
||||
out.write(" <h1>⚠️ 验证与错误流实验室</h1>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"lab\">\n");
|
||||
out.write(" <strong>实验任务卡</strong>\n");
|
||||
out.write(" <ul>\n");
|
||||
out.write(" <li>先点“填入错误示例”,提交后观察字段级错误是如何显示的</li>\n");
|
||||
out.write(" <li>再点“填入正确示例”,观察 Action 成功后的返回</li>\n");
|
||||
out.write(" <li>思考:为什么 Struts2 的校验失败会回到 input 页,而不是直接报 500?</li>\n");
|
||||
out.write(" </ul>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <div class=\"quick\">\n");
|
||||
out.write(" <button type=\"button\" onclick=\"fillBad()\">填入错误示例</button>\n");
|
||||
out.write(" <button type=\"button\" onclick=\"fillGood()\">填入正确示例</button>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005fif_005f0(_jspx_page_context))
|
||||
return;
|
||||
out.write("\n");
|
||||
out.write("\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005fform_005f0(_jspx_page_context))
|
||||
return;
|
||||
out.write("\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"card\">\n");
|
||||
out.write(" <h3>学习点</h3>\n");
|
||||
out.write(" <ul>\n");
|
||||
out.write(" <li>字段错误通过 <code>addFieldError()</code> 收集</li>\n");
|
||||
out.write(" <li>JSP 使用 <code><s:fielderror></code> 精准展示错误</li>\n");
|
||||
out.write(" <li>成功路径与失败路径在同一个页面闭环,对学习最直观</li>\n");
|
||||
out.write(" </ul>\n");
|
||||
out.write(" </div>\n");
|
||||
out.write("\n");
|
||||
out.write(" <p><a href=\"learn\">← 返回学习中心</a></p>\n");
|
||||
out.write("\n");
|
||||
out.write(" <script>\n");
|
||||
out.write(" function fillBad() {\n");
|
||||
out.write(" document.querySelector('input[name=\"username\"]').value = 'a';\n");
|
||||
out.write(" document.querySelector('input[name=\"email\"]').value = 'bad-email';\n");
|
||||
out.write(" document.querySelector('input[name=\"age\"]').value = '-1';\n");
|
||||
out.write(" }\n");
|
||||
out.write(" function fillGood() {\n");
|
||||
out.write(" document.querySelector('input[name=\"username\"]').value = 'zhangsan';\n");
|
||||
out.write(" document.querySelector('input[name=\"email\"]').value = 'zhangsan@example.com';\n");
|
||||
out.write(" document.querySelector('input[name=\"age\"]').value = '22';\n");
|
||||
out.write(" }\n");
|
||||
out.write(" </script>\n");
|
||||
out.write("</body>\n");
|
||||
out.write("</html>\n");
|
||||
} catch (java.lang.Throwable t) {
|
||||
if (!(t instanceof javax.servlet.jsp.SkipPageException)){
|
||||
out = _jspx_out;
|
||||
if (out != null && out.getBufferSize() != 0)
|
||||
try {
|
||||
if (response.isCommitted()) {
|
||||
out.flush();
|
||||
} else {
|
||||
out.clearBuffer();
|
||||
}
|
||||
} catch (java.io.IOException e) {}
|
||||
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
|
||||
else throw new ServletException(t);
|
||||
}
|
||||
} finally {
|
||||
_jspxFactory.releasePageContext(_jspx_page_context);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fif_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:if
|
||||
org.apache.struts2.views.jsp.IfTag _jspx_th_s_005fif_005f0 = (org.apache.struts2.views.jsp.IfTag) _005fjspx_005ftagPool_005fs_005fif_0026_005ftest.get(org.apache.struts2.views.jsp.IfTag.class);
|
||||
boolean _jspx_th_s_005fif_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fif_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fif_005f0.setParent(null);
|
||||
// /validation-lab.jsp(38,8) name = test type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fif_005f0.setTest("resultMessage != null");
|
||||
int _jspx_eval_s_005fif_005f0 = _jspx_th_s_005fif_005f0.doStartTag();
|
||||
if (_jspx_eval_s_005fif_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
|
||||
if (_jspx_eval_s_005fif_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = org.apache.jasper.runtime.JspRuntimeLibrary.startBufferedBody(_jspx_page_context, _jspx_th_s_005fif_005f0);
|
||||
}
|
||||
do {
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"ok\">");
|
||||
if (_jspx_meth_s_005fproperty_005f0(_jspx_th_s_005fif_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("</div>\n");
|
||||
out.write(" ");
|
||||
int evalDoAfterBody = _jspx_th_s_005fif_005f0.doAfterBody();
|
||||
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
|
||||
break;
|
||||
} while (true);
|
||||
if (_jspx_eval_s_005fif_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = _jspx_page_context.popBody();
|
||||
}
|
||||
}
|
||||
if (_jspx_th_s_005fif_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fif_0026_005ftest.reuse(_jspx_th_s_005fif_005f0);
|
||||
_jspx_th_s_005fif_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fif_005f0, _jsp_getInstanceManager(), _jspx_th_s_005fif_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fproperty_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fif_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:property
|
||||
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f0 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
|
||||
boolean _jspx_th_s_005fproperty_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fproperty_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fproperty_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fif_005f0);
|
||||
// /validation-lab.jsp(39,28) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fproperty_005f0.setValue("resultMessage");
|
||||
int _jspx_eval_s_005fproperty_005f0 = _jspx_th_s_005fproperty_005f0.doStartTag();
|
||||
if (_jspx_th_s_005fproperty_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f0);
|
||||
_jspx_th_s_005fproperty_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fproperty_005f0, _jsp_getInstanceManager(), _jspx_th_s_005fproperty_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005fform_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:form
|
||||
org.apache.struts2.views.jsp.ui.FormTag _jspx_th_s_005fform_005f0 = (org.apache.struts2.views.jsp.ui.FormTag) _005fjspx_005ftagPool_005fs_005fform_0026_005fmethod_005faction.get(org.apache.struts2.views.jsp.ui.FormTag.class);
|
||||
boolean _jspx_th_s_005fform_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005fform_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005fform_005f0.setParent(null);
|
||||
// /validation-lab.jsp(42,8) name = action type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fform_005f0.setAction("validation_submit");
|
||||
// /validation-lab.jsp(42,8) name = method type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005fform_005f0.setMethod("post");
|
||||
int _jspx_eval_s_005fform_005f0 = _jspx_th_s_005fform_005f0.doStartTag();
|
||||
if (_jspx_eval_s_005fform_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
|
||||
if (_jspx_eval_s_005fform_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = org.apache.jasper.runtime.JspRuntimeLibrary.startBufferedBody(_jspx_page_context, _jspx_th_s_005fform_005f0);
|
||||
}
|
||||
do {
|
||||
out.write("\n");
|
||||
out.write(" <div class=\"field\">\n");
|
||||
out.write(" <label>用户名</label>\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005ftextfield_005f0(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005ffielderror_005f0(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" <div class=\"field\">\n");
|
||||
out.write(" <label>邮箱</label>\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005ftextfield_005f1(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005ffielderror_005f1(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" <div class=\"field\">\n");
|
||||
out.write(" <label>年龄</label>\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005ftextfield_005f2(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" ");
|
||||
if (_jspx_meth_s_005ffielderror_005f2(_jspx_th_s_005fform_005f0, _jspx_page_context))
|
||||
return true;
|
||||
out.write("\n");
|
||||
out.write(" </div>\n");
|
||||
out.write(" <button type=\"submit\">提交实验</button>\n");
|
||||
out.write(" ");
|
||||
int evalDoAfterBody = _jspx_th_s_005fform_005f0.doAfterBody();
|
||||
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
|
||||
break;
|
||||
} while (true);
|
||||
if (_jspx_eval_s_005fform_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
|
||||
out = _jspx_page_context.popBody();
|
||||
}
|
||||
}
|
||||
if (_jspx_th_s_005fform_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005fform_0026_005fmethod_005faction.reuse(_jspx_th_s_005fform_005f0);
|
||||
_jspx_th_s_005fform_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005fform_005f0, _jsp_getInstanceManager(), _jspx_th_s_005fform_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005ftextfield_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:textfield
|
||||
org.apache.struts2.views.jsp.ui.TextFieldTag _jspx_th_s_005ftextfield_005f0 = (org.apache.struts2.views.jsp.ui.TextFieldTag) _005fjspx_005ftagPool_005fs_005ftextfield_0026_005fname_005fnobody.get(org.apache.struts2.views.jsp.ui.TextFieldTag.class);
|
||||
boolean _jspx_th_s_005ftextfield_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005ftextfield_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005ftextfield_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /validation-lab.jsp(45,16) name = name type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ftextfield_005f0.setName("username");
|
||||
int _jspx_eval_s_005ftextfield_005f0 = _jspx_th_s_005ftextfield_005f0.doStartTag();
|
||||
if (_jspx_th_s_005ftextfield_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005ftextfield_0026_005fname_005fnobody.reuse(_jspx_th_s_005ftextfield_005f0);
|
||||
_jspx_th_s_005ftextfield_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005ftextfield_005f0, _jsp_getInstanceManager(), _jspx_th_s_005ftextfield_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005ffielderror_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:fielderror
|
||||
org.apache.struts2.views.jsp.ui.FieldErrorTag _jspx_th_s_005ffielderror_005f0 = (org.apache.struts2.views.jsp.ui.FieldErrorTag) _005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssStyle_005fnobody.get(org.apache.struts2.views.jsp.ui.FieldErrorTag.class);
|
||||
boolean _jspx_th_s_005ffielderror_005f0_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005ffielderror_005f0.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005ffielderror_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /validation-lab.jsp(46,16) name = fieldName type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ffielderror_005f0.setFieldName("username");
|
||||
// /validation-lab.jsp(46,16) name = cssStyle type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ffielderror_005f0.setCssStyle("color:#e74c3c;font-size:12px;");
|
||||
int _jspx_eval_s_005ffielderror_005f0 = _jspx_th_s_005ffielderror_005f0.doStartTag();
|
||||
if (_jspx_th_s_005ffielderror_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssStyle_005fnobody.reuse(_jspx_th_s_005ffielderror_005f0);
|
||||
_jspx_th_s_005ffielderror_005f0_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005ffielderror_005f0, _jsp_getInstanceManager(), _jspx_th_s_005ffielderror_005f0_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005ftextfield_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:textfield
|
||||
org.apache.struts2.views.jsp.ui.TextFieldTag _jspx_th_s_005ftextfield_005f1 = (org.apache.struts2.views.jsp.ui.TextFieldTag) _005fjspx_005ftagPool_005fs_005ftextfield_0026_005fname_005fnobody.get(org.apache.struts2.views.jsp.ui.TextFieldTag.class);
|
||||
boolean _jspx_th_s_005ftextfield_005f1_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005ftextfield_005f1.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005ftextfield_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /validation-lab.jsp(50,16) name = name type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ftextfield_005f1.setName("email");
|
||||
int _jspx_eval_s_005ftextfield_005f1 = _jspx_th_s_005ftextfield_005f1.doStartTag();
|
||||
if (_jspx_th_s_005ftextfield_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005ftextfield_0026_005fname_005fnobody.reuse(_jspx_th_s_005ftextfield_005f1);
|
||||
_jspx_th_s_005ftextfield_005f1_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005ftextfield_005f1, _jsp_getInstanceManager(), _jspx_th_s_005ftextfield_005f1_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005ffielderror_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:fielderror
|
||||
org.apache.struts2.views.jsp.ui.FieldErrorTag _jspx_th_s_005ffielderror_005f1 = (org.apache.struts2.views.jsp.ui.FieldErrorTag) _005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssStyle_005fnobody.get(org.apache.struts2.views.jsp.ui.FieldErrorTag.class);
|
||||
boolean _jspx_th_s_005ffielderror_005f1_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005ffielderror_005f1.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005ffielderror_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /validation-lab.jsp(51,16) name = fieldName type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ffielderror_005f1.setFieldName("email");
|
||||
// /validation-lab.jsp(51,16) name = cssStyle type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ffielderror_005f1.setCssStyle("color:#e74c3c;font-size:12px;");
|
||||
int _jspx_eval_s_005ffielderror_005f1 = _jspx_th_s_005ffielderror_005f1.doStartTag();
|
||||
if (_jspx_th_s_005ffielderror_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssStyle_005fnobody.reuse(_jspx_th_s_005ffielderror_005f1);
|
||||
_jspx_th_s_005ffielderror_005f1_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005ffielderror_005f1, _jsp_getInstanceManager(), _jspx_th_s_005ffielderror_005f1_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005ftextfield_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:textfield
|
||||
org.apache.struts2.views.jsp.ui.TextFieldTag _jspx_th_s_005ftextfield_005f2 = (org.apache.struts2.views.jsp.ui.TextFieldTag) _005fjspx_005ftagPool_005fs_005ftextfield_0026_005fname_005fnobody.get(org.apache.struts2.views.jsp.ui.TextFieldTag.class);
|
||||
boolean _jspx_th_s_005ftextfield_005f2_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005ftextfield_005f2.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005ftextfield_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /validation-lab.jsp(55,16) name = name type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ftextfield_005f2.setName("age");
|
||||
int _jspx_eval_s_005ftextfield_005f2 = _jspx_th_s_005ftextfield_005f2.doStartTag();
|
||||
if (_jspx_th_s_005ftextfield_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005ftextfield_0026_005fname_005fnobody.reuse(_jspx_th_s_005ftextfield_005f2);
|
||||
_jspx_th_s_005ftextfield_005f2_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005ftextfield_005f2, _jsp_getInstanceManager(), _jspx_th_s_005ftextfield_005f2_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean _jspx_meth_s_005ffielderror_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fform_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
|
||||
throws java.lang.Throwable {
|
||||
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
|
||||
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
|
||||
// s:fielderror
|
||||
org.apache.struts2.views.jsp.ui.FieldErrorTag _jspx_th_s_005ffielderror_005f2 = (org.apache.struts2.views.jsp.ui.FieldErrorTag) _005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssStyle_005fnobody.get(org.apache.struts2.views.jsp.ui.FieldErrorTag.class);
|
||||
boolean _jspx_th_s_005ffielderror_005f2_reused = false;
|
||||
try {
|
||||
_jspx_th_s_005ffielderror_005f2.setPageContext(_jspx_page_context);
|
||||
_jspx_th_s_005ffielderror_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fform_005f0);
|
||||
// /validation-lab.jsp(56,16) name = fieldName type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ffielderror_005f2.setFieldName("age");
|
||||
// /validation-lab.jsp(56,16) name = cssStyle type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
|
||||
_jspx_th_s_005ffielderror_005f2.setCssStyle("color:#e74c3c;font-size:12px;");
|
||||
int _jspx_eval_s_005ffielderror_005f2 = _jspx_th_s_005ffielderror_005f2.doStartTag();
|
||||
if (_jspx_th_s_005ffielderror_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
|
||||
return true;
|
||||
}
|
||||
_005fjspx_005ftagPool_005fs_005ffielderror_0026_005ffieldName_005fcssStyle_005fnobody.reuse(_jspx_th_s_005ffielderror_005f2);
|
||||
_jspx_th_s_005ffielderror_005f2_reused = true;
|
||||
} finally {
|
||||
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_s_005ffielderror_005f2, _jsp_getInstanceManager(), _jspx_th_s_005ffielderror_005f2_reused);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user