• myeclipse中修改servlet的模板代码


    #---------------------------------------------#
    # <aw:description>Template for Servlet</aw:description>
    # <aw:version>1.1</aw:version>
    # <aw:date>04/05/2003</aw:date>
    # <aw:author>Ferret Renaud</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(req,resp);
        }
     
    </aw:method>
     
    <aw:method name="doPut">
        public void doPut(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
     
            // Put your code here
        }
     
    </aw:method>
     
    <aw:method name="doDelete">
        public void doDelete(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
     
            // Put your code here
        }
     
    </aw:method>
     
    <aw:method name="init">
        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">
        public String getServletInfo() {
            return "This is my default servlet created by Eclipse";
        }
     
    </aw:method>
     
    描述:找到这个路径下的MyEclipseCommonplugins的com.genuitec.eclipse.wizards_8.5.0.me201003052220.jar,我用的是myeclipse8.5,用解压缩软件打开,并修改添加进去既可,templates文件夹里全部是模板代码,你可以任意疯狂了,修改里面的废物代码,利用搜索servlet.java就是你要修改的
  • 相关阅读:
    12个非常不错的javascript类库
    CSS中单位em和rem的区别
    CSS中box-sizing属性的作用
    网页设计中的默认字体样式详解
    jQuery遍历Table表格的行和列
    css常用解决方案
    JS判断字符串小括号是否成对合法
    Less编码规范
    React九宫格抽奖
    n个有序数组,取出k个最大值
  • 原文地址:https://www.cnblogs.com/qq809306794/p/3175720.html
Copyright © 2020-2023  润新知