hi,Japper, need your help!

alwaysgreen (alwaysgreen)
本文发表在 rolia.net/zh 相约加拿大网上社区枫下论坛
I test a Servlet program to know more about the class GenericServlet .But I met some errors. Why?
The program is HelloWorldSerlet.java:

import java.io.*;
import java.util.Date;

import javax.Servlet.*;
public class HelloWorldServlet extends GenericServlet
{
String initString;
public void init(ServletConfig config)
throw ServletException
{
super.init(config);
initString=new String("I have been initialized");
}
public void Service(ServletRequest req,ServletRespone res)
{
Date today=new Date();
ServletOutputStream out=res.getOutputStream();
out.println("Hello World");
out.println(today.toString());
out.println(getServletInfo());
}
public void Destroy()
{
}
pubic String getServletInfo()
{
return "Create a page that says Hello World and send date back produced by djf";
}
}


And I already to set the path=c:\jdk1.1.8\bin;
CLASSPATH=c:\jdk1.1.8\class\classes.zip
And I used "javac HelloWorldServlet.java" to compile it,but I got errors:
"Package javax.Servlet not found in import."
"Superclass GenericServlet of class HelloWorldServlet not found..."
I check my path and classpath for many times, I have no idea ! :-(
Help me!
更多精彩文章及讨论,请光临枫下论坛. 网址: rolia.net/zh
(#13340@0)
2000-11-6 -05:00

回到话题: hi,Japper, need your help!

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

URL:   
http://www.rolia.net/zh/post.php?f=0&p=13340