1.在MyEclipse6.6\myeclipse\eclipse\plugins下
找到com.genuitec.eclipse.wizards

2.templates\
替换Servlet.java

#---------------------------------------------#
# <aw:description>Template for Servlet</aw:description>
# <aw:version>1.1</aw:version>
# <aw:date>04/05/2003</aw:date>
# <aw:author>Guo Ming</aw:author>
#---------------------------------------------# <aw:import>java.io.IOException</aw:import>
<aw:import>java.io.PrintWriter</aw:import> <aw:import>javax.servlet.ServletException</aw:import>
<aw:import>javax.servlet.http.HttpServlet</aw:import>
<aw:import>javax.servlet.http.HttpServletRequest</aw:import>
<aw:import>javax.servlet.http.HttpServletResponse</aw:import> <aw:parentClass>javax.servlet.http.HttpServlet</aw:parentClass> <aw:constructor name="c1">
/**
* Constructor of the object.
*/
public <aw:className/>() {
super();
} </aw:constructor> <aw:method name="doGet"> public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException { } </aw:method> <aw:method name="doPost"> public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
doGet(request, response);
} </aw:method> <aw:method name="doPut">
/**
* The doPut method of the servlet. <br>
*
* This method is called when a HTTP put request is received.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doPut(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException { // Put your code here
} </aw:method> <aw:method name="doDelete">
/**
* The doDelete method of the servlet. <br>
*
* This method is called when a HTTP delete request is received.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doDelete(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException { // Put your code here
} </aw:method> <aw:method name="init">
/**
* Initialization of the servlet. <br>
*
* @throws ServletException if an error occurs
*/
public void init() throws ServletException {
// Put your code here
} </aw:method> <aw:method name="destroy">
/**
* Destruction of the servlet. <br>
*/
public void destroy() {
super.destroy(); // Just puts "destroy" string in log
// Put your code here
} </aw:method> <aw:method name="getServletInfo">
/**
* Returns information about the servlet, such as
* author, version, and copyright.
*
* @return String information about this servlet
*/
public String getServletInfo() {
return "This is my default servlet created by Eclipse";
} </aw:method>

3.templates\jsp
替换Jsp.vtl

#*---------------------------------------------#
# Template for a JSP
# @version: 1.2
# @author: Ferret Renaud
# @author: Guo Ming
#---------------------------------------------#
*#<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body>
</body>
</html>

修改\Servlet和Jsp模板的方法的更多相关文章

  1. ajax 异步 通信 小例子 servlet与 jsp异步 post方法

    post请求 url后面加参数 接收不到的,必须 放到send("use"=user)形式 还要加上 xhr.setRequestHeader("Content-Type ...

  2. 如何修改Myeclipse的JSP模板

    先找到MyEclipse的安装目录, 再找到myeclipse/eclipse/plugins/com.genuitec.eclipse.wizards_5.1.0/templates/jsp (co ...

  3. 修改myeclipse的jsp模板

    在myeclipse的安装目录下: C:\Users\Seeker\AppData\Local\MyEclipse Professional\plugins 找到com.genuitec.eclips ...

  4. IDEA修改Servlet的代码生成模板

    file--->settings,打开settings面板

  5. 修改MyEclipse默认的Servlet和jsp代码模板

    一.修改Servlet的默认模板代码 使用MyEclipse创建Servlet时,根据默认的Servlet模板生成的Servlet代码如下: 1 package gacl.servlet.study; ...

  6. 转】MyEclipse使用总结——修改MyEclipse默认的Servlet和jsp代码模板

    原博文出自于: http://www.cnblogs.com/xdp-gacl/p/3769058.html 感谢! 一.修改Servlet的默认模板代码 使用MyEclipse创建Servlet时, ...

  7. MyEclipse使用总结——修改MyEclipse默认的Servlet和jsp代码模板

    http://www.cnblogs.com/xdp-gacl/p/3769058.html   孤傲苍狼 只为成功找方法,不为失败找借口! MyEclipse使用总结——修改MyEclipse默认的 ...

  8. 如何在MyEclipse中更改servlet模板 Jsp模板

    http://blog.csdn.net/sjw890821sjw/article/details/6995190 刚换上Myeclipse9.0,结果要修改servlet模板的时候不像Myeclps ...

  9. JavaWeb学习之Servlet(二)----Servlet的生命周期、继承结构、修改Servlet模板

    [声明] 欢迎转载,但请保留文章原始出处→_→ 文章来源:http://www.cnblogs.com/smyhvae/p/4140466.html 一.http协议回顾: 在上一篇文章中:JavaW ...

随机推荐

  1. ubuntu下安装自动补全YouCompleteMe

    一.安装预备软件.#vim要带python2.7的支持,curl是下载插件必须用到的软件,还有git apt install vim-nox-py2 curl git #安装python头文件 apt ...

  2. 11个常用的Linux命令

    Linux命令行吸引了大多数Linux爱好者.一个正常的Linux用户一般掌握大约50-60个命令来处理每日的任务.今天为你解释下面几个命令:sudo.python.mtr.Ctrl+x+e.nl.s ...

  3. SpringBoot接口服务处理Whitelabel Error Page

    转载请注明来源:http://blog.csdn.net/loongshawn/article/details/50915979 <SpringBoot接口服务处理Whitelabel Erro ...

  4. js操作cookie的一些注意项

     这两天做购物车逻辑.依照通常的做法,把预购信息存放在cookie里,结果发生了非常多不可理喻的事情,完整的证明了我对cookie的无知. . . 这么多年.非常少用cookie,由于认为它不安全 ...

  5. Scanner.findInLine()与while的使用莫名其妙的导致NoSuchElementException: No line found

    public static boolean parseHTML(Scanner sc, List<String> errorInfo) { String[] tags = new Stri ...

  6. SSL的单向认证和双向认证

    原文地址:http://alvinhu.com/blog/2013/06/20/one-way-and-two-way-ssl-authentication/?utm_source=tuicool&a ...

  7. 代码审计之Finecms任意文件下载漏洞

    PS:该漏洞已被公布,只是学习.故自己跟着大佬的步伐审计. 文件地址:\controllers\ApiController.php Line 57 public function downAction ...

  8. linux - native task api 测试

    #include <stdio.h>#include <signal.h>#include <unistd.h>#include <sys/mman.h> ...

  9. sql 语句 查询两个字段都相同的方法

    这是替代方法 先使用着 select * from ofgroup where groupId in (select groupId from ofgroup where  uid ='". ...

  10. ubuntu vnc安装

    VNC(Virtual Network Computing),为一种使用RFB协议的屏幕画面分享及远程操作软件.此软件借由网络,可发送键盘与鼠标的动作及即时的屏幕画面. 1. 安装vnc服务器 sud ...