mrstuff68
May 30th, 2003, 08:30 PM
I am trying to learn Jakarta Tomcat to do some JSP programming. I have downloaded the JKD 1.4 and Tomcat 4.2 to do this JSP, i have installed all the software and my Tomcat server is working, my JSP example scripts work.
But when i go to compiler one of my .java documents to get the .class file it doesnt want to work. Here is what i am doing. And the errors that I got. What can i do to fix this.
D:\j2sdk1.4.1_03\bin>javac HelloServlet.java
HelloServlet.java:2: package javax.servlet does not exist
import javax.servlet.*;
^
HelloServlet.java:3: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
HelloServlet.java:13: cannot resolve symbol
symbol : class HttpServlet
location: class HelloServlet
public class HelloServlet extends HttpServlet {
^
HelloServlet.java:14: cannot resolve symbol
symbol : class HttpServletRequest
location: class HelloServlet
public void doGet(HttpServletRequest request,
^
HelloServlet.java:15: cannot resolve symbol
symbol : class HttpServletResponse
location: class HelloServlet
HttpServletResponse response)
^
HelloServlet.java:16: cannot resolve symbol
symbol : class ServletException
location: class HelloServlet
throws ServletException, IOException {
^
6 errors
D:\j2sdk1.4.1_03\bin>
Thanks to all that reply
But when i go to compiler one of my .java documents to get the .class file it doesnt want to work. Here is what i am doing. And the errors that I got. What can i do to fix this.
D:\j2sdk1.4.1_03\bin>javac HelloServlet.java
HelloServlet.java:2: package javax.servlet does not exist
import javax.servlet.*;
^
HelloServlet.java:3: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
HelloServlet.java:13: cannot resolve symbol
symbol : class HttpServlet
location: class HelloServlet
public class HelloServlet extends HttpServlet {
^
HelloServlet.java:14: cannot resolve symbol
symbol : class HttpServletRequest
location: class HelloServlet
public void doGet(HttpServletRequest request,
^
HelloServlet.java:15: cannot resolve symbol
symbol : class HttpServletResponse
location: class HelloServlet
HttpServletResponse response)
^
HelloServlet.java:16: cannot resolve symbol
symbol : class ServletException
location: class HelloServlet
throws ServletException, IOException {
^
6 errors
D:\j2sdk1.4.1_03\bin>
Thanks to all that reply