This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

simple question

 
Jackie Wang
Ranch Hand
Posts: 315
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which class does a servlet usually inherit from?

Fully-qualified classname:*
(e.g. "java.lang.Thread")
should it be javax?
Thanks!
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13048
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The servlet API provides two classes that you might use as parent to your servlet. If your servlet is to be used to respond to typical HTTP GET or POST requests you would probably use javax.servlet.http.HttpServlet as the parent. If your servlet is to be more general, you might use javax.servlet.GenericServlet as the parent.
One of the nice things about Tomcat is that it comes with complete JavaDocs for these packages.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic