fix<优化下单逻辑>
parent
9dfe3a62aa
commit
7159a02ee2
|
@ -63,6 +63,7 @@ public class OrdersServlet extends HttpServlet {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
resp.sendRedirect("/");
|
req.setAttribute("msg","下单成功");
|
||||||
|
req.getRequestDispatcher("/result.jsp").forward(req, resp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,10 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>我的订单</h1>
|
<h1>我的订单</h1>
|
||||||
|
|
||||||
|
<div style="color: red;">
|
||||||
|
<p>${requestScope.msg}</p>
|
||||||
|
</div>
|
||||||
<table border="1">
|
<table border="1">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
<%@ page contentType="text/html; charset=UTF-8" language="java" %>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>操作结果</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>操作结果</h1>
|
||||||
|
|
||||||
|
<div style="color: red;">
|
||||||
|
<p>${requestScope.msg}</p>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<a href="/">主页</a>
|
||||||
|
</body>
|
||||||
|
</html>
|
Reference in New Issue