myeclipse中修改servlet的模板代码


Java代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#---------------------------------------------#
# <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(request,response);
     }
 
</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>
描述:找到这个路径下的MyEclipse\Common\plugins的com.genuitec.eclipse.wizards_9.0.0.me201108091322.jar,我用的是myeclipse10,用解压缩软件打开,并修改添加进去既可,templates文件夹里全部是模板代码,你可以任意疯狂了,修改里面的废物代码,利用搜索servlet.java就是你要修改的
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值