开始学习servlet,编译过程出错,求大神解释!
servlet吧
全部回复
仅看楼主
level 3
小西音♬ 楼主
package com.lx;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class MyFirstServlet implements Servlet{
public void init(ServletConfig config)throws ServletException{
}
public ServletConfig getServletConfig(){
return null;
}
public void service(ServletRequest req,ServletResponse res)throws ServletException,java.io.IOException{
System.out.println("hello,world");
}
public String getServletInfo(){
return null;
}
public void destory(){
}
}
编译出错,提示MyFristServlet类不是抽象类,且未覆盖destory()的方法。。
急,求大神解决!
2016年04月07日 03点04分 1
level 1
是继承不是实现
2016年04月13日 11点04分 3
可为啥视频里的老师这么写就没问题啊~~~~(>_<)~~~~
2016年04月14日 07点04分
level 3
你这是监听或者过滤吧
2016年06月04日 07点06分 4
1