#---------------------------------------------#
# <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就是你要修改的