trying to run the below code on my linux box:
Code:
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
public class TestingServlet extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
PrintWriter out = response.getWriter();
out.println("<HTML>");
out.println("<HEAD>");
out.println("<TITLE>Servlet Testing</TITLE>");
out.println("</HEAD>");
out.println("<BODY>");
out.println("Welcome to the Servlet Testing Center");
out.println("</BODY>");
out.println("</HTML>");
}
}
java version
Code:
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)
when i compile i get
Code:
@skunkworks:/usr/lib/apache-tomcat/webapps/myApp/WEB-INF# javac Test*
TestingServlet.java:1: package javax.servlet does not exist
import javax.servlet.*;
^
TestingServlet.java:2: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
TestingServlet.java:6: cannot find symbol
symbol: class HttpServlet
public class TestingServlet extends HttpServlet {
^
TestingServlet.java:8: cannot find symbol
symbol : class HttpServletRequest
location: class TestingServlet
public void doGet(HttpServletRequest request,
^
TestingServlet.java:9: cannot find symbol
symbol : class HttpServletResponse
location: class TestingServlet
HttpServletResponse response)
^
TestingServlet.java:10: cannot find symbol
symbol : class ServletException
location: class TestingServlet
throws ServletException, IOException {
^
6 errors
new to this - pls help... also, did i enclude enough in the post from an info standpoint???