This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Servlets and the fly likes constructors in servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "constructors in servlets" Watch "constructors in servlets" New topic
Author

constructors in servlets

sandy sean
Ranch Hand

Joined: Dec 30, 2010
Posts: 62
Hi!

Why there are no constructors in servlets?

thanks...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56185
    
  13

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.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: constructors in servlets
 
Similar Threads
default constructor in HttpServlet
constructors...
servlet & constructors
Constructors for Interface
Why dont we write constructors in servlets?