制作servlet模板
选中window--》preference--->搜索template---》选中java下面的template
new一个
Name的设置,当你在eclipse里创建了一个servlet文件后清空
输入serv alt+/ 就会出来该模板
description 是 模板的描述信息
pattern就是模板的内容
package ${enclosing_package}; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class ${primary_type_name} extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } }