Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

constructors in servlets  RSS feed

 
sandy sean
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

Why there are no constructors in servlets?

thanks...
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66208
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are. Servlets are just like any other Java class. Constructors just aren't particularly useful in servlets as the init() life-cycle method is used to initialize a servlet.

This has been covered many times before. Please SearchFirst.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!