forked from admin/struts2-demo
134 lines
4.8 KiB
Plaintext
134 lines
4.8 KiB
Plaintext
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
|
<%@ taglib prefix="s" uri="/struts-tags" %>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Success Dashboard - Struts2 Demo Lab</title>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
min-height: 100vh;
|
|
padding: 24px;
|
|
font-family: "Aptos", "Segoe UI", "Microsoft YaHei", sans-serif;
|
|
background: linear-gradient(135deg, #0d8f7c 0%, #31c48d 55%, #d4f7e7 100%);
|
|
color: #123028;
|
|
}
|
|
.shell {
|
|
max-width: 1080px;
|
|
margin: 0 auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 18px;
|
|
}
|
|
.card {
|
|
background: rgba(255,255,255,0.94);
|
|
border-radius: 28px;
|
|
padding: 28px;
|
|
box-shadow: 0 24px 60px rgba(0,0,0,0.18);
|
|
}
|
|
.eyebrow {
|
|
font-size: 12px;
|
|
letter-spacing: 0.12em;
|
|
text-transform: uppercase;
|
|
color: #0d8f7c;
|
|
font-weight: 800;
|
|
}
|
|
h1, h2 { margin: 10px 0 12px; }
|
|
p { margin: 0; color: #446056; line-height: 1.85; }
|
|
.stats {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
gap: 12px;
|
|
margin-top: 18px;
|
|
}
|
|
.stat {
|
|
padding: 16px;
|
|
border-radius: 18px;
|
|
border: 1px solid #d7eee6;
|
|
background: #f7fcfa;
|
|
}
|
|
.stat span { display: block; color: #5f7f75; font-size: 12px; margin-bottom: 6px; }
|
|
.stat strong { font-size: 22px; }
|
|
.links {
|
|
display: flex;
|
|
gap: 10px;
|
|
flex-wrap: wrap;
|
|
margin-top: 18px;
|
|
}
|
|
.link-btn {
|
|
display: inline-flex;
|
|
padding: 10px 14px;
|
|
border-radius: 999px;
|
|
background: #e8f8f2;
|
|
color: #0d8f7c;
|
|
text-decoration: none;
|
|
font-weight: 700;
|
|
}
|
|
@media (max-width: 760px) {
|
|
.stats { grid-template-columns: 1fr; }
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="shell">
|
|
<section class="card">
|
|
<div class="eyebrow">Result</div>
|
|
<h1>Demo flow completed successfully</h1>
|
|
<p>This page now acts as a shared success dashboard for multiple form-based actions. It makes the result screen more useful than a single success line.</p>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<div class="eyebrow">Current submission</div>
|
|
<h2><s:property value="displayName != null ? displayName : username"/></h2>
|
|
<p><s:property value="recommendation != null ? recommendation : profileStage"/></p>
|
|
|
|
<div class="stats">
|
|
<div class="stat">
|
|
<span>Username</span>
|
|
<strong><s:property value="username" default="demo-user"/></strong>
|
|
</div>
|
|
<div class="stat">
|
|
<span>Role or stage</span>
|
|
<strong><s:property value="role != null ? role : profileStage"/></strong>
|
|
</div>
|
|
<div class="stat">
|
|
<span>Timestamp</span>
|
|
<strong><s:property value="loginTime != null ? loginTime : submittedAt"/></strong>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="links">
|
|
<a class="link-btn" href="../index.jsp">Back to portal</a>
|
|
<a class="link-btn" href="form.jsp">Open user form</a>
|
|
<a class="link-btn" href="../validation/form.jsp">Run validation demo</a>
|
|
<a class="link-btn" href="../upload/index.jsp">Open upload demo</a>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<div class="eyebrow">What happened</div>
|
|
<h2>Map this result back to the Struts stack</h2>
|
|
<div class="stats">
|
|
<div class="stat">
|
|
<span>Action mapping</span>
|
|
<strong>login</strong>
|
|
<p>The request matched the <code>login</code> action in <code>struts.xml</code>.</p>
|
|
</div>
|
|
<div class="stat">
|
|
<span>Execute result</span>
|
|
<strong>SUCCESS</strong>
|
|
<p>The action returned the success result instead of redisplaying the form.</p>
|
|
</div>
|
|
<div class="stat">
|
|
<span>Rendered view</span>
|
|
<strong>/user/success.jsp</strong>
|
|
<p>The result mapping selected this JSP to present the post-action summary.</p>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</body>
|
|
</html>
|