第一步:找到JSP模板

  eclipse — >perferences – >Web -> jsp files -Editor ->templates:

    

第二步:准备编辑JSP的模板

  选择JSP with html markup,点击右边的Edit进入编辑界面

  

第三步:把编辑好的模板内容粘贴进去

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">

</style>
</head>
<body>

</body>
<script type="text/javascript">

</script>
</html>

 点击 Apply and Close 

版权声明:本文为mjtabu原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/mjtabu/p/11243879.html