File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Does not able to compile Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Does not able to compile Servlet" Watch "Does not able to compile Servlet" New topic
Author

Does not able to compile Servlet

Jaffery Rab
Ranch Hand

Joined: Jan 18, 2002
Posts: 36
Hi
I got the problem while I am compiling my servlet class code is so simple and I set up my classpath too but I got the error message like

I set up my classpath like
C:\j2sdkee1.3.1\lib\j2ee.jar;C:\j2sdkee1.3.1\lib\classes;C:\jdk1.3.1_02\bin; C:\j2sdkee1.3.1\bin;c:\j2sdkee1.3.1\lib\locale

and my J2ee server is running fine got no problem with that .why is that help me please
Cheers,
Jaffrey
Barry Andrews
Ranch Hand

Joined: Sep 05, 2000
Posts: 523

I set up my classpath like
C:\j2sdkee1.3.1\lib\j2ee.jar;C:\j2sdkee1.3.1\lib\classes;C:\jdk1.3.1_02\bin; C:\j2sdkee1.3.1\bin;c:\j2sdkee1.3.1\lib\locale

First of all, the bin directories should be in the path, not classpath. Only classes go in the classpath. Also, you do not need the lib\classes in the classpath. You just need the jar files. Anyway, this probably doesn't matter in this case since your system is able to find javac. I would still clean this up anyway though. Try this after cleaning up the mess: Type set classpath from the command line and see if the j2ee.jar is there and verify that the path is correct. If it's there and it points to the correct file, then it will work. Hope this helps!
Barry
Mario Rendon
Greenhorn

Joined: Jul 11, 2002
Posts: 24
you should verifythat the jar files you are ussing in your classpath
in this case "C:\j2sdkee1.3.1\lib\j2ee.jar" contain the Package you are trying to import..
use winzip to see the contents of the Jar file ..
as it were a simple zip file ..

if you don't find the javax.servlet. package
just include the Jar that has it..
Anthony Villanueva
Ranch Hand

Joined: Mar 22, 2002
Posts: 1055
Originally posted by Mario Rendon:
use winzip to see the contents of the Jar file ..
as it were a simple zip file ..

Alternatively, you can use jar -tvf jarFileName.jar | more
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Does not able to compile Servlet