File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes creating .class file in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "creating .class file in Tomcat" Watch "creating .class file in Tomcat" New topic
Author

creating .class file in Tomcat

deepak borole
Greenhorn

Joined: Nov 13, 2005
Posts: 25
hi I am trying to compile a servlet program.I tried to set the path for java & apache by running this batch file:
-----------------------------------------------------------------
set path=%path%=;C:\Program Files\Java\jdk1.5.0\bin;C:\Program Files\Apache Group\Tomcat 4.1\bin
set classpath=%classpath%=;C:\Program Files\Java\jdk1.5.0\lib;C:\Program Files\Apache Group\Tomcat 4.1\lib\tools.jar
-----------------------------------------------------------------
I can execute javac command from DOS prompt,but when i compile my program

javac hitCountServlet.java

it cannot find javax servlet packages & hence doesnot compile.

I have tried using J2EE & using corresponding batch file.It compiles & executes in J2EE


Winners Dont Do Different Things, They Do Things Differently !!!
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You also need to add servlet-api.jar to your CLASSPATH.
It's located in tomcat/common/lib.
In that version of Tomcat, it may be called "servlet.jar".


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: creating .class file in Tomcat
 
Similar Threads
Shortcut for Project Execution
help in starting tomcat..
Help needed setting classpath
apache tomcat is arrogant...........huh
Basic Doubts