I am trying to import the following, but for some reason it is not working.
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
I jsut set up Tomcat 7 and it is working. Is there anything else I have to do so that it can see the things I am trying to import?
Howard
Error's I am receiving
C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\webdev\WEB-INF\cl
asses\exercises\intro>javac FirstServlet.java
FirstServlet.java:4: error: package javax.servlet does not exist
import javax.servlet.*;
^
FirstServlet.java:5: error: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
FirstServlet.java:8: error: cannot find symbol
public class FirstServlet extends HttpServlet {
^
symbol: class HttpServlet
FirstServlet.java:10: error: cannot find symbol
public void doGet(HttpServletRequest req, HttpServletResponse res)
^
symbol: class HttpServletRequest
location: class FirstServlet
FirstServlet.java:10: error: cannot find symbol
public void doGet(HttpServletRequest req, HttpServletResponse res)
^
symbol: class HttpServletResponse
location: class FirstServlet
FirstServlet.java:11: error: cannot find symbol
throws ServletException, IOException {
^
symbol: class ServletException
location: class FirstServlet
6 errors
C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\webdev\WEB-INF\cl
asses\exercises\intro>
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
I jsut set up Tomcat 7 and it is working. Is there anything else I have to do so that it can see the things I am trying to import?
Howard
Error's I am receiving
C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\webdev\WEB-INF\cl
asses\exercises\intro>javac FirstServlet.java
FirstServlet.java:4: error: package javax.servlet does not exist
import javax.servlet.*;
^
FirstServlet.java:5: error: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
FirstServlet.java:8: error: cannot find symbol
public class FirstServlet extends HttpServlet {
^
symbol: class HttpServlet
FirstServlet.java:10: error: cannot find symbol
public void doGet(HttpServletRequest req, HttpServletResponse res)
^
symbol: class HttpServletRequest
location: class FirstServlet
FirstServlet.java:10: error: cannot find symbol
public void doGet(HttpServletRequest req, HttpServletResponse res)
^
symbol: class HttpServletResponse
location: class FirstServlet
FirstServlet.java:11: error: cannot find symbol
throws ServletException, IOException {
^
symbol: class ServletException
location: class FirstServlet
6 errors
C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\webdev\WEB-INF\cl
asses\exercises\intro>