myEclipse中 学习视频 新建Servlet 类的子类。 
但是每次建立出来  选择继承doget  和dopost方法    出来很多 多余的代码 和注释 。
请问有没有办法 把 注释去除掉 ?
问题如下public class ServletTest extends HttpServlet { /**
 * The doGet method of the servlet. <br>
 *
 * This method is called when a form has its tag value method equals to get.
 * 
 * @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 doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException { response.setContentType("text/html");
PrintWriter out = response.getWriter();
out
.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
out.println("<HTML>");
out.println("  <HEAD><TITLE>A Servlet</TITLE></HEAD>");
out.println("  <BODY>");
out.print("    This is ");
out.print(this.getClass());
out.println(", using the GET method");
out.println("  </BODY>");
out.println("</HTML>");
out.flush();
out.close();
}

解决方案 »

  1.   

    w我只需要每次建立的时候 出现public class ServletTest extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException { }
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException { }}
      

  2.   

    在使用MyEclipse新建文件时常常有些不需要的冗余代码可以采用如下方式进行更改。         1、进入MyEclipse安装目录搜索com.genuitec.eclipse.wizards或者直接进入%MyEclipse安装目录%\Common\plugins\下查找com.genuitec.eclipse.wizards_8.6.0.me201007140905.jar文件,此文件会根据MyEclipse的版本号不同后面的数字会有所不同。        2、拷贝一份留做备份,用rar打开此包。发现有个templates目录,即所有的模版都在此目录下存放。        3、示例:修改默认新建Servlet的模版
                  A、把Servlet.java解压出来
                  B、用文本编辑工具打开,去掉其中不需要的注释和冗余代码即可       4、在templates目录下还存在html、xhtml、jsp、xml文件夹分别放着他们各自的代码模版       5、重启myeclipse
      

  3.   

    myeclipse建servlet类的时候就是这样,手动删除一下冗余的注释和代码就可以了