Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes how to run a servletrunner Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to run a servletrunner" Watch "how to run a servletrunner" New topic
Author

how to run a servletrunner

poppey
Greenhorn

Joined: May 05, 2001
Posts: 2
i am folowing the web sites aboutservlet runner.but i don't follow.........
i wrote a simple program
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorld extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
PrintWriter out = response.getWriter();
out.println("Hello World");
}
}
and it gives the following error
import javax.servlet.http.*;
^
HelloWorldServlet.java:4: cannot resolve symbol
symbol : class HttpServlet
location: class HelloWorld
public class HelloWorld extends HttpServlet {
^
HelloWorldServlet.java:5: cannot resolve symbol
symbol : class HttpServletRequest
location: class HelloWorld
public void doGet(HttpServletRequest request,
^
HelloWorldServlet.java:6: cannot resolve symbol
symbol : class HttpServletResponse
location: class HelloWorld
HttpServletResponse response)
^
HelloWorldServlet.java:7: cannot resolve symbol
symbol : class ServletException
location: class HelloWorld
throws ServletException, IOException {
^
7 errors
what might be the cause.I compiled on java\bin where i compile my other programs.
thanks.........
please help me/...............
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12789
    
    5
The class library for servlets is NOT part of the normal distribution SDK. You need to get a copy of the servlet.jar file - it is part of the Tomcat distribution from jakarta.apache.org
I suggest NOT using a servlet runner from an older distribution of the JSWDK, Sun turned all development over to the Apache organization quite a while ago.
Bill
 
 
subject: how to run a servletrunner