• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Duh in Servlets

 
Namit Gaur
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Where do i put servlet.jar file in order to compile servlets? in windows environment. I am using JDK1.3
Thanks
Namit
------------------
 
Raja Shekhar
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
Make sure that the dirrectory is in class path
which has got servlet.jsr file
Raja Shekhar B
 
Anoop Krishnan
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai Namit,
I can give you a simple solution just copy your jar file and put it to C:\jdk1.3\jre\lib directory and try it
 
Anoop Krishnan
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Anoop Krishnan:
Hai Namit,
I can give you a simple solution just copy your jar file and put it to [JAVA_HOME]\jre\lib directory and try it

 
Namit Gaur
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anoop,
I tried that but it doesnt seem to work. Everyone says you have to put the jar file in the classpath. How do i find what is the classpath?
Thanks,
Namit
 
Sophia Oscario
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Windows 98 you can edit file autoexec.bat (in C:/WINDOWS )
just edit the line SET CLASSPATH = blablabla
for example the actual line is :
SET CLASSPATH=C:\Programs\test
then just edit it become
SET CLASSPATH=C:\Programs\test;\path\to\servlet.jar
Just simply add your path to servlet.jar to the CLASSPATH.
Then don't forget to execute the autoexec.bat after you edit it to get the effect.
If you use Win NT/Win 2000
just go to the Control Panel -> System -> Environment
then do the same thing like above ...
If there's no CLASSPATH there, you can add it by your self.
if you want to make sure whether the CLASSPATH has been set, you can go to the command prompt and type "set | more"
Find the word CLASSPATH and make sure there's nothing wrong with it.
So, good luck !!


------------------
** Science belongs to the world **
 
Namit Gaur
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks Sophia for the tip. I was able to compile servlet. But, I was able to do it through command prompt only.
Is it possible to compile servlets through free visual IDEs available like Jbuilder Foundation, or visual cafe?? I was not successful in compiling the servlet through JBuilder Foundation. It doesnt recognize the import javax.servlet line.
Thanks
Namit
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic