File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes How to compile java file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "How to compile java file" Watch "How to compile java file" New topic
Author

How to compile java file

Sabber bhatia
Ranch Hand

Joined: Jun 27, 2006
Posts: 59
hello everyone

i am not being able to complie java file having java.servlet.http.*
i installed jdk 1.5,jre for that and tomcat
please tell me what is the problem

thanks
Sabeer bhatia
samith pinnaduwa
Greenhorn

Joined: Apr 22, 2008
Posts: 6
try using javax.servlet.http.*;


SCJP 1.5
SCWCD 1.5
Sabber bhatia
Ranch Hand

Joined: Jun 27, 2006
Posts: 59
i used this

import javax.servlet.http.*;
Justin Russo
Ranch Hand

Joined: Oct 21, 2007
Posts: 77
Does your classpath contain the proper jars. servlet-api.jar is in my tomcat lib dir which contains the classes. Please check that..


You Want it.. Get it.......the Right Way...<br /> <br />SCJP 5.0 SCWCD 5.0
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4725

More info on Classpath and Compiling Servlets


A good workman is known by his tools.
Sabber bhatia
Ranch Hand

Joined: Jun 27, 2006
Posts: 59
hey marc

just one question Is that mean i have to set classpath
means i have to copy this
C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar and set in path.

Please help me with this.
Thanks
Sabeer bhatia
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4725

The instructions in the link explain what to do. It includes another link labeled HowToSetTheClasspath.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to compile java file
 
Similar Threads
create tables using java code by fetching from .sql file
CD Rom auto run
CD Rom auto run
JSP and Java wait help
Ant error: Make sure you have it in you classpath