File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet" Watch "servlet" New topic


Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I am using IBM visual age to write servlets.Can anyone tell
me how to use the servlet package in the class.
In My program if i give
import javax.servlet.*
import javax.servlet.http.*;
I get error as javax package error.what should i do?
R Mutum

Joined: Sep 07, 2000
Posts: 4
Place a copy of servlet.jar in c:\jdk...\jre\lib\ext folder. The jar file is in lib folder of your server installation (tomcat, etc.). This should fix it.
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
As also ointed by R Muttam .
You can also set the classpath . Set the classpath which should also include the jar files(if reqd).
e.g:set classpath=%classpath%;c:\jsdk2.0\lib;c:\jsdk2.0\lib\jsdk.jar;
Please verify your exact path.
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Thanks! for the reply.I know that by setting the
classpath for the suns JDK , the problem will be solved.
But my problem, i am using IBM visual age and from here
how i can set the classpath, i cant type set classpath...
I hope i am clear in explaining my problem.

[This message has been edited by avn (edited September 08, 2000).]
I agree. Here's the link:
subject: servlet
jQuery in Action, 3rd edition