I'm trying to compile a servlet, and I get the following errors...being new
to java I'm trying to figure why I'm getting such errors and how I can fix
it. Thanks - John
SimpleServlet.java:1: cannot resolve symbol
symbol : class HttpServlet
location: class SimpleServlet
public class SimpleServlet extends HttpServlet
^
SimpleServlet.java:6: cannot resolve symbol
symbol : class HttpServletRequest
location: class SimpleServlet
public void doGet (HttpServletRequest request,
^
SimpleServlet.java:7: cannot resolve symbol
symbol : class HttpServletResponse
location: class SimpleServlet
HttpServletResponse response)
^
SimpleServlet.java:8: cannot resolve symbol
symbol : class ServletException
location: class SimpleServlet
throws ServletException, IOException
^
SimpleServlet.java:8: cannot resolve symbol
symbol : class IOException
location: class SimpleServlet
throws ServletException, IOException
^
SimpleServlet.java:10: cannot resolve symbol
symbol : class PrintWriter
location: class SimpleServlet
PrintWriter out;
^
6 errors
12-15-2000, 10:53 PM
a
Re: compiling
does error occurr when compiling (i believe it does) it so, be sure
when compiling you have the following dir:
jdk1.2x\javax\servlet
?
"John Butorac" <jbutorac@nlamerica.com> wrote:
>I'm trying to compile a servlet, and I get the following errors...being
new
>to java I'm trying to figure why I'm getting such errors and how I can fix
>it. Thanks - John
>
>SimpleServlet.java:1: cannot resolve symbol
>symbol : class HttpServlet
>location: class SimpleServlet
> public class SimpleServlet extends HttpServlet
> ^
>SimpleServlet.java:6: cannot resolve symbol
>symbol : class HttpServletRequest
>location: class SimpleServlet
> public void doGet (HttpServletRequest request,
> ^
>SimpleServlet.java:7: cannot resolve symbol
>symbol : class HttpServletResponse
>location: class SimpleServlet
> HttpServletResponse response)
> ^
>SimpleServlet.java:8: cannot resolve symbol
>symbol : class ServletException
>location: class SimpleServlet
> throws ServletException, IOException
> ^
>SimpleServlet.java:8: cannot resolve symbol
>symbol : class IOException
>location: class SimpleServlet
> throws ServletException, IOException
> ^
>SimpleServlet.java:10: cannot resolve symbol
>symbol : class PrintWriter
>location: class SimpleServlet
> PrintWriter out;
> ^
>6 errors
>
>
12-16-2000, 12:27 PM
John Butorac
Re: compiling
I was able to fix it by modifying my classpath to include only one
....servlet.jar...I take it I can only reference one servlet.jar?
"a" <albert77@rocketmail.com> wrote in message
news:3a3ae733$1@news.devx.com...
>
> does error occurr when compiling (i believe it does) it so, be sure
> when compiling you have the following dir:
> jdk1.2x\javax\servlet
> ?
>
> "John Butorac" <jbutorac@nlamerica.com> wrote:
> >I'm trying to compile a servlet, and I get the following errors...being
> new
> >to java I'm trying to figure why I'm getting such errors and how I can
fix
> >it. Thanks - John
> >
> >SimpleServlet.java:1: cannot resolve symbol
> >symbol : class HttpServlet
> >location: class SimpleServlet
> > public class SimpleServlet extends HttpServlet
> > ^
> >SimpleServlet.java:6: cannot resolve symbol
> >symbol : class HttpServletRequest
> >location: class SimpleServlet
> > public void doGet (HttpServletRequest request,
> > ^
> >SimpleServlet.java:7: cannot resolve symbol
> >symbol : class HttpServletResponse
> >location: class SimpleServlet
> > HttpServletResponse response)
> > ^
> >SimpleServlet.java:8: cannot resolve symbol
> >symbol : class ServletException
> >location: class SimpleServlet
> > throws ServletException, IOException
> > ^
> >SimpleServlet.java:8: cannot resolve symbol
> >symbol : class IOException
> >location: class SimpleServlet
> > throws ServletException, IOException
> > ^
> >SimpleServlet.java:10: cannot resolve symbol
> >symbol : class PrintWriter
> >location: class SimpleServlet
> > PrintWriter out;
> > ^
> >6 errors
> >
> >
>