hi,Japper, need your help!

alwaysgreen (alwaysgreen)
<本文发表于: 相约加拿大:枫下论坛 www.rolia.net/f >
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
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");
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;
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!
<本文发表于: 相约加拿大:枫下论坛 www.rolia.net/f >

2000-11-6 -04:00

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

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