This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Servlets and the fly likes error in servlet compile Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "error in servlet compile" Watch "error in servlet compile" New topic
Author

error in servlet compile

satyasandha samal
Greenhorn

Joined: Aug 11, 2009
Posts: 5
hi,
i have face a problem for runnimg servlet
java_home=C:\Program Files\Java\jdk1.5.0_15;

i have set path =C:\Program Files\Java\jdk1.5.0_15\bin;C:\Program Files\apache-tomcat-5.5.28;
set classpath=C:\Program Files\apache-tomcat-5.5.28\lib\servlet-api.jar; C:\Program Files\apache-tomcat-5.5.28\lib\jsp-ap.jar;
when i am compile first.java under C:\Program Files\apache-tomcat-5.5.28\webapps\jsppage\classes
getting error
as package javax.servlet does not exist
please help what i am wrong

thank's
satya
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13868
    
  10

Welcome to JavaRanch.

How exactly are you compiling your source code, are you doing that on the command line, or are you using an IDE?

When you set the classpath, you have to be careful with spaces in the path. Try this:

set classpath="C:\Program Files\apache-tomcat-5.5.28\lib\servlet-api.jar";"C:\Program Files\apache-tomcat-5.5.28\lib\jsp-api.jar";.

Note: Paths with spaces in them are in "quotes", and there must not be a space between the ; and the next entry in the path.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36478
    
  16
Please look at our Servlets FAQ, and also check whether you need to download anything more than the standard Jave installation.

Moving to servlets forum.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error in servlet compile
 
Similar Threads
Unable to import
compiling servlets and jsp and running in tomcat
package javax.servlet does not exist
Compiling servlet [was: HTTP Status 404 - Servlet Login is not available]
package com.example.model.* does not exist ERROR head first servlets