• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Does not able to compile Servlet

 
Jaffery Rab
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 528
C++ Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1055
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic