.Java的设置方法:
/**
*@author name
*@date ${DATE} ${TIME}
*/
![](https://i-blog.csdnimg.cn/blog_migrate/540b46e71cd5d2b908f8704e53c0555c.png)
.jsp的设置方法:
<%--
Created by IntelliJ IDEA.
User: name
Date: ${DATE}
Time: ${TIME}
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
<base href="<%=basePath%>">
<title>#[[$Title$]]#</title>
</head>
<body>
#[[$END$]]#
</body>
</html>
![](https://i-blog.csdnimg.cn/blog_migrate/8c697ab4bd05b19bc186ff4e257e9478.png)