-
compiling
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
-
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
>
>
-
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
> >
> >
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks