全局日期处理、文件上传下载、参数绑定、restful请求
This commit is contained in:
@ -0,0 +1,32 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>文件上传</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/file.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form action="${pageContext.request.contextPath }/upFile" method="post" enctype="multipart/form-data">
|
||||
请选择上传文件:<input name="file" type="file"><br>
|
||||
<input type="submit" value="点击上传文件">
|
||||
</form>
|
||||
|
||||
<form action="${pageContext.request.contextPath }/upFiles" method="post" enctype="multipart/form-data">
|
||||
请选择上传文件(多选):<input name="file" type="file" multiple><br>
|
||||
<input type="submit" value="点击上传文件">
|
||||
</form>
|
||||
|
||||
<form action="${pageContext.request.contextPath }/upFiles2" method="post" enctype="multipart/form-data">
|
||||
请选择上传文件1:<input name="file1" type="file"><br>
|
||||
请选择上传文件2:<input name="file2" type="file"><br>
|
||||
文件内容额外备注: <input name="extendParam" type="text"><br>
|
||||
<input type="submit" value="点击上传文件">
|
||||
</form>
|
||||
|
||||
<form action="${pageContext.request.contextPath }/upFileForDownload" method="post" enctype="multipart/form-data">
|
||||
上传并下载:<input name="file" type="file"><br>
|
||||
<input type="submit" value="点击上传文件">
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,9 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>文件下载</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href="${pageContext.request.contextPath}/download?filePath=${filePath}">${fileName}</a>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,15 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>Restful</title>
|
||||
<script src="${pageContext.request.contextPath}/js/jquery3.3.1.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<ul>
|
||||
<li>姓名:${empty name ? p.name : name}</li>
|
||||
<li>年龄:${empty age ? p.age : age}</li>
|
||||
<li>薪酬:${empty salary ? p.salary : salary}</li>
|
||||
<li>生日:${empty birthday ? p.birthday : birthday}</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,9 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
操作成功!
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,3 @@
|
||||
form {
|
||||
border: 1px green dashed;
|
||||
}
|
10364
spring/springmvc-base-annotation/src/main/webapp/js/jquery3.3.1.js
Normal file
10364
spring/springmvc-base-annotation/src/main/webapp/js/jquery3.3.1.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user