Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unable to compile servlet

 
vijaya saradhi
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ranchers, please help me regarding servlet compilation.I am using ubantu 8 linux.The problem is when I create servlets java file and try to compile using javac -classpath [path to servlet-api.jar] -d classes [path to java file]

It gives out errors like http not found .javax.servlet not found etc.
how to set classpath in ubantu linux.

finally I gave up doing it in ubantu and started learning using eclipse in windowns xp platform.
But I want to know is it better to use eclipse to manage all these things like creating a servlet class file and project files creation.

But I want to practice each and every step in HFSJ book .Please clear my doubt.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It gives out errors like http not found .javax.servlet not found etc.

It means that the compiler did not find servlet-api.jar file. Check your path. Please post your command line, and the exact error message.

But I want to know is it better to use eclipse to manage all these things like creating a servlet class file and project files creation.

It's not better, but it will save you time, as long as your familiar with Eclipse. I don't know how the examples in HFSJ but I guess that they are small enough to be easily compiled from the command line.
 
vijaya saradhi
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot Christophe.
I ll check
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic