aspose file tools*
The moose likes Beginning Java and the fly likes package javax.servlet does not exist!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "package javax.servlet does not exist!!!" Watch "package javax.servlet does not exist!!!" New topic
Author

package javax.servlet does not exist!!!

divya sharma
Ranch Hand

Joined: Jan 25, 2007
Posts: 87
Hi,
I am running servlet on textpad while compling it shows me an error that "package javax.servlet does not exist".
Please help me to find the solution of this problem.

thanks
divya


Divya
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
The servlet stuff is not in the base JDK. If you haven't already, you'll need to download the J2EE jars and get them into your classpath. Here's the
1.4 SDK and it has a link to the Java 5 version.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Jaime M. Tovar
Ranch Hand

Joined: Mar 28, 2005
Posts: 133
If you already have a server running, like tomcat, it already has the j2ee jars, just add them to the -cp option when you javac.


She will remember your heart when men are fairy tales in books written by rabbits.<br /> As long as there is duct tape... there is also hope.
divya sharma
Ranch Hand

Joined: Jan 25, 2007
Posts: 87
Please explain me the process of -cp
Abdulla Mamuwala
Ranch Hand

Joined: Jan 09, 2004
Posts: 225
-cp tells the java compiler (javac) utility to include the j2ee jars in its classpath. I guess the -cp command is unix command.

example

javac -cp <bye.jar> Hello

compile Hello.java with bye.jar in the classpath. chill
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14274
    
  21

Originally posted by divya sharma:
Please explain me the process of -cp

It is explained in the documentation. Also have a look at this: Setting the class path.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: package javax.servlet does not exist!!!