wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes problem in compilation of servlet in apache-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 » Java » Beginning Java
Bookmark "problem in compilation of servlet in apache-tomcat" Watch "problem in compilation of servlet in apache-tomcat" New topic
Author

problem in compilation of servlet in apache-tomcat

Himanshu Daurbi
Greenhorn

Joined: Nov 09, 2011
Posts: 4
Hello friends,
I am using apache-tomcat 5.5.17 and jdk 1.6 . I have already set path of jdk using environment variable. I am deploying a servlet on it after starting server. I have already made directory structure in desktop. I am compiling my program using statement in command prompt.

C:>cd Users\him\desktop\project //here is my directory structure
C:>javac - classpath \Users\him\applications\tomcat 5.5\common\lib\servlet-api.jar;classes:. classes src\com\example\web\myservlet.java

and I'm getting error like this----
javac : invalid flag: 5.5\common\lib\servlet-api.jar;classes:.


I'm waiting for your response and thanks in advance...........
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37884
    
  22
Have you got a space after the -?
Have you got a space before 5.5? If you need a space before 5.5, then the whole classpath should be enclosed in "quotes".
Himanshu Daurbi
Greenhorn

Joined: Nov 09, 2011
Posts: 4
Hi Ritchie,
Thanks so much to you. My program is working correctly now.

Thanks & Regards,
Himanshu Daurbi
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37884
    
  22
“You’re welcome”, and well done
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37884
    
  22
. . . and welcome to the Ranch I hadn’t noticed you are new.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in compilation of servlet in apache-tomcat
 
Similar Threads
problem in servlet complation
basic servlet compilation difficulty
please help! classpath not working
struts class file error
Cannot find symbol