• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Classpath while compiling Servlet

 
Reghuram Variyam
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can sone one explain why we would need to provide classpath to tomcat/commom/lib/servlet-api.jar:classes when compiling a servlet(page 81 in HF book) ? My understanding was that, while compiling all classes needed for Servlet is present in java libraries.
 
Johan Pelgrim
Ranch Hand
Posts: 105
Android Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
He Reghuram...

Try finding package "javax.servlet.*" in any Java runtime environment's rt.jar... it's not there! You need a jar from your Servlet / JSP Container containing implementation classes of the Servlet / JSP API specification to be able to compile Servlets and 'run' JSP pages...

Good luck!
 
Reghuram Variyam
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic