• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet.jar vs servlet-api.jar

 
Alfred Harre
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the difference between the two (servlet.jar & servlet-api.jar). I have servlet.jar in my CLASSPATH and have so far no problem in compiling and running HF Beer example.
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, as I'm sure you know, the Servlet specification is just a loose collection of interfaces (like HttpServlet) and classes. So, ultimately, you need to have an implementation of those classes to actually run the darn thing (usually provided by your web container at runtime). The point is that sometimes, you won't have an implementation of the Servlet specification until runtime. Ergo the api jar.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic