那就直接用记事本写吧
继承HttpServlet
重写
public void init() throws ServletException;初始化方法
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException,ServletException;处理Http Get请求
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException,ServletException;处理Http Post请求
public void destroy();Servlet销毁
最后在web.xml里配置
<servlet>
<servlet-name>servlet逻辑名</servlet-name>
<servlet-class>servlet包名.类名</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>servlet逻辑名(和上面一致)</servlet-name>
<url-pattern>访问地址</url-pattern>
</servlet-mapping>