The Artima Developer Community
Sponsored Link

Java Answers Forum
Error with java SimpleServlet - Urgent

9 replies on 1 page. Most recent reply: May 21, 2003 2:15 AM by Satya

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 9 replies on 1 page
Eric Cantona

Posts: 5
Nickname: god
Registered: May, 2003

Error with java SimpleServlet - Urgent Posted: May 12, 2003 4:37 AM
Reply to this message Reply
Advertisement
F:\Servlets Project\SimpleServlet.java:3: package javax.servlet does not exist
import javax.servlet.*;
^
F:\Servlets Project\SimpleServlet.java:5: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
F:\Servlets Project\SimpleServlet.java:7: cannot resolve symbol
symbol : class HttpServlet
location: class SimpleServlet
public class SimpleServlet extends HttpServlet {
^
F:\Servlets Project\SimpleServlet.java:15: cannot resolve symbol
symbol : class HttpServletRequest
location: class SimpleServlet
public void doGet (HttpServletRequest request, HttpServletResponse response)
^
F:\Servlets Project\SimpleServlet.java:15: cannot resolve symbol
symbol : class HttpServletResponse
location: class SimpleServlet
public void doGet (HttpServletRequest request, HttpServletResponse response)
^
F:\Servlets Project\SimpleServlet.java:17: cannot resolve symbol
symbol : class ServletException
location: class SimpleServlet
throws ServletException, IOException {
^
6 errors


Rahul

Posts: 52
Nickname: wildhorse
Registered: Oct, 2002

Re: Error with java SimpleServlet - Urgent Posted: May 12, 2003 4:52 AM
Reply to this message Reply
Looks like you have not included the jar files that contain HttpServlet and related classes in your classpath.

If you are using JSDK, then try adding jsdk.jar to your classpath. If you are using other servers, refer to installing and configuration docs for figuring out what goes in the classpath.

Eric Cantona

Posts: 5
Nickname: god
Registered: May, 2003

Re: Error with java SimpleServlet - Urgent Posted: May 12, 2003 5:22 AM
Reply to this message Reply
we are using j2ee. how do we do it. we tried what you said but it doesnt seem to work.

Rahul

Posts: 52
Nickname: wildhorse
Registered: Oct, 2002

Re: Error with java SimpleServlet - Urgent Posted: May 12, 2003 5:42 AM
Reply to this message Reply
Have you added j2ee.jar in your classpath..? Another thing...I hope you are including this statement in your program 'import javax.servlet.*'..

Rahul

Posts: 52
Nickname: wildhorse
Registered: Oct, 2002

Re: Error with java SimpleServlet - Urgent Posted: May 12, 2003 5:43 AM
Reply to this message Reply
Sorry, didn't notice the code above 'import javax.servlet...'

Eric Cantona

Posts: 5
Nickname: god
Registered: May, 2003

Re: Error with java SimpleServlet - Urgent Posted: May 12, 2003 5:51 AM
Reply to this message Reply
Trying to do this but we are having problems. in other words we don't have a clue please help.

Rahul

Posts: 52
Nickname: wildhorse
Registered: Oct, 2002

Re: Error with java SimpleServlet - Urgent Posted: May 12, 2003 5:55 AM
Reply to this message Reply
Can u send me your classpath settings?

Eric Cantona

Posts: 5
Nickname: god
Registered: May, 2003

Re: Error with java SimpleServlet - Urgent Posted: May 12, 2003 5:59 AM
Reply to this message Reply
We have installed it but we don't know how to set up the class path settings. Each time we try nothing happens. can't find the .jar files for it either.
Help
Thanks

Rahul

Posts: 52
Nickname: wildhorse
Registered: Oct, 2002

Re: Error with java SimpleServlet - Urgent Posted: May 12, 2003 6:39 AM
Reply to this message Reply
In the bin directory of your j2ee installation you may find a script called j2ee.bat or startserver.bat depending on the version. In this file, set up the values for java_home, j2ee_home, j2ee classpath etc...

Most of the files that the server generally requires stays in the lib directory.

Start the server by running this script...

User classpaths can be specified in the user.properties file in the bin directory (if u have such requirements). Apart from this, try reading up the documentation...

Best of luck,

Satya

Posts: 2
Nickname: chitty
Registered: Apr, 2003

Re: Error with java SimpleServlet - Urgent Posted: May 21, 2003 2:15 AM
Reply to this message Reply
here the problem is with the Servlet class file only(servlet.jar).find that jar file and add that jar file path to ur CLASSPATH.
go to the find files option and search for *.jar file.u can difinitely fing the jar files in ur system.then add that jar file to ur class path settings.if u still go the problem then send a mail with ur class path settings and ur servlet.jar file path or send all jar files paths.so that i can help more specifically.

Flat View: This topic has 9 replies on 1 page
Topic: JDBC Help !!! Previous Topic   Next Topic Topic: Using Jython in Jave App

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use