Hello List :)

I have successfully installed the following system:

RedHat 7.1
Apache 1.3.19 (I think - I installed the one that comes with RH dist.)
Tomcat 3.2.3 Binary
Sun JDK 1.3.1 Binary

Everything plays together nicely so far, except I can't seem to compile a
servlet.  From what I'm seeing and what I understand, its somehow not
recognizing my servlet.jar file in $TOMCAT_HOME/lib (even though it sees the
tools.jar among others).  Any help would be much appreciated.

Error Message is:

SimpleServlet.java:1: package javax.servlet does not exist
import javax.servlet.*;
^
SimpleServlet.java:2: package javax.servlet.http does not exist
import javax.servlet.http.*;
^

And then everywhere I make a reference to something in one of those packages
O get a "cannot resolve symbol"


Servlet Code:

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;

public class SimpleServlet extends HttpServlet {

        public void init(ServletConfig config)
          throws ServletException {
                super.init(config);
        }

        public void doGet(HttpServletRequest request,
          HttpServletResponse response)
          throws ServletException, IOException {
                response.setContentType("text/html");
                PrintWriter out = response.getWriter();

                out.println("<html>");
                out.println("<head><title>SimpleServlet</title></head>");
                out.println("<body>");

                out.println("Your request method was " + request.getMethod()
                  + "\n");

                out.println("</body></html>");
                out.close();
        }
}

Reply via email to