Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

compilation problem in servlet program

 
phanikumar jami
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i have a problem that , when i execute a servlet program in my pc i its not compiled and it shows 6 errors. i set the class path of the tomcat server correctly. but its not compiled. can any one please answer my question....
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the error you are seeing.
 
Prashant Hurria
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you include Servlet.jar in your classpath it is located at
<apache-home>\common\lib\servlet.jar
 
phanikumar jami
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prashant Hurria wrote:Did you include Servlet.jar in your classpath it is located at
<apache-home>\common\lib\servlet.jar


ya i included serlet-api.jar in my class path.
 
Amir Iqbal
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kindly post the errors so that we can reach to the actual problem.

Regards,
 
Soumil Shah
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this..

Set the CLASSPATH through the command prompt at the location where you are compiling your servlet code.
 
phanikumar jami
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Soumil Shah wrote:Try this..

Set the CLASSPATH through the command prompt at the location where you are compiling your servlet code.



ya i know this. with the temporary class path setting in command prompt , the program will compiled. but the output is not came. the browser shows error that the directory is not found.
 
Santhosh Reddy
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Full stack trace of the error will give a better picture of the error and thereby an easier and fast solution will be yours.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic