Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Not able to compile servlets

 
Meenakshi Sriram
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am new to this forum. I am in the beginning stage of tsudying servlets. O downloaded tomcat apache 5.0 and installed properly. (I was not able to starup the server and when i added java_home environment variable it started properly).
The whole problem is I am not able to compile my servlets. I have set my CLASSPATH and JAVA_HOME environment variable in the system properties of windows XP.
CLASSPATH = .;c:\program files\apache...\tomcat 5.0\common\servlet-api.jar
JAVA_HOME = C:\program files\java\j2sdk1.4.2_10
I am trying to compile my file HelloWorld.java in the dos prompt
c:\program files\apache...\tomcat 5.0\webapps\jspbook\WEB-INF\classes\com.\.\HelloWorld.Java
I am not able to figure out where I going wrong can anyone please help me.
Any type of advice is welcome.Thanks in advance
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64970
86
IntelliJ IDE Java jQuery Mac Mac OS X
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One helpful detail would be the compiler error
 
Prabodh Reddy
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which Operating System u r using?
at the command prompt type
echo %classpath%
you will see wheter classpath is set to the corresponding jars of the servlet and JDK.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic