File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet package is not accessible

 
Rashid Ali
Ranch Hand
Posts: 349
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i try to compile my servlet application, it does not compile and through an error that javax.servlet.* ; and javax.servlet.http.*; packages are not accessible to it even though my code is cent percent okay and it should be compiled without any error.
May i know which file i missing in my j2sdk13 causing my servlet liberary unaccessible. I am running J2SDK13 under WIN98 environment.
Please advise.
Thanks in advance.
Rashid Ali
 
Arun Boraiah
Ranch Hand
Posts: 233
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All you need to do is either set classpath env variable to jsdk.jar file. or append classpath in the local command window (used to compile your servlet file)to jsdk.jar which is found in the lib folder of your jsdk installation folder.
-arun
 
Rashid Ali
Ranch Hand
Posts: 349
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your prompt reply.
But actually on my computer there's only Tomcat installed not JSDK.
So in that case should i have to set the classpath of javax.servlet directory available with Tomcat installation?
Please revert.
Rashid Ali
 
Arun Boraiah
Ranch Hand
Posts: 233
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi if you have only tomcat installed in your system. Then to compile servlet put servlet.jar in your classpath to compile which is presnet in <tomcat root>\lib folder.
-arun
 
Rashid Ali
Ranch Hand
Posts: 349
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Arun, i shall try today night and will revert back to you tomorrow, as i am at work and i have to do this with my home computer.
Thanks again for your help.
Rashid
 
Rashid Ali
Ranch Hand
Posts: 349
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Arun, its perfectly running.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic