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
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!
更多精彩文章及讨论,请光临枫下论坛. 网址: rolia.net/zh
2000-11-6 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: hi,Japper, need your help!

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论