1.点击File ----> 找到Settings点击进入
2.点击Editor -----> 找到File and code templates点击进入
3.在Other下有一个Jsp.Files,点击里面的Jsp.Files.jsp,然后就可以在右侧编辑模板
4.这里有我编辑好的模板大家可以拿去用
<%--
Created by IntelliJ IDEA.
User: ${USER}
Date: ${DATE}
Time: ${TIME}
To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
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>