alwaysgreen (alwaysgreen)
<本文发表于: 相约加拿大:枫下论坛 >
I create a servlet program named

import java.util.Date;
import javax.servlet.*;

public class HelloWorldServlet extends GenericServlet
String initString;

public void init(ServletConfig config)
throws ServletException
initString=new String("I have been initialized");
public void Service(ServletRequest req,ServletResponse res)
throws IOException, ServletException
Date today=new Date();
ServletOutputStream out=res.getOutputStream();
out.println("Hello World");
public void Destroy()

public String getServletInfo()
return "Create a page that says Hello World and send date back produced by djf";

When I compile it ,it shows me "Class HelloWorldSerlet must be declared abstrat.It dose not define void service...."
It seems that I didn't success declare the class HelloWorldServlet at first.
I just want to test the method of GenericServlet.
So please tell why I got that error.
<本文发表于: 相约加拿大:枫下论坛 >

2000-11-10 -04:00

回到话题: hi,Japper, what's about error 500?

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论