Would you like to react to this message? Create an account in a few clicks or log in to continue.


 
HomeHome  SearchSearch  Latest imagesLatest images  RegisterRegister  Log in  

 

 Compilation Error

Go down 
AuthorMessage
sojan

sojan


Number of posts : 29
Age : 40
Registration date : 2007-03-04

Compilation Error Empty
PostSubject: Compilation Error   Compilation Error EmptyMon Mar 12, 2007 10:35 am

/**************Errors while compiling**********************/

HelloServlet.java:2: package javax.servlet does not exist
import javax.servlet.*;
^
HelloServlet.java:3: package javax.servlet.http does not exi
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

/**************Errors while compiling**********************/

I have written a batch file tomcat..bat like this
/********** tomcat.bat *************/
set classpath=;E/tomcat/tomcat-5/common/lib/servlet-api.jar set classpath=;E/tomcat/tomcat-5/common/lib/jsp-api.jar
/********** tomcat.bat *************/

You need both JARs in the classpath. Try:
set
CLASSPATH=E:tomcattomcat-5commonlibservlet-api.jar;E:tomcattomcat
-5commonlibjsp-api.jar
javac -classpath .;%CLASSPATH% *.java

The tomcat.bat file is in the same folder as the source file
HelloServlet.java.

set CLASSPATH=C:\Tools\apache-tomcat-5.5\common\lib\servlet-api.jar;C:\Tools\apache-tomcat-5.5\common\lib\jsp-api.jar
Back to top Go down
http://sojanctherakom.googlepages.com
 
Compilation Error
Back to top 
Page 1 of 1
 Similar topics
-
» Error Codes
» Oracle Error Messages

Permissions in this forum:You cannot reply to topics in this forum
 :: Programming Languages :: JAVA-
Jump to: