File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Getting MEAN with Mongo, Express, Angular, and Node
this week in the
ServletConfig in Constructor
Joined: Jul 15, 2010
Mar 25, 2012 08:47:07
Can anyone please tell why can't we use
I read Kathy Sierra for SCWCD-1.5 but still i am not able to understand the exact reason
Please guide me.
Thanks in advance.
Author and all-around good cowpoke
Joined: Mar 22, 2000
Mar 26, 2012 07:27:05
Simple explanation: That is not the way it (the
The architecture of having a container create an instance with a no-args constructor combined with a separate initialization method is common in
, get used to it.
I agree. Here's the link:
subject: ServletConfig in Constructor
Why Init() method
Why init() if constructor is there
why we cant't use constructor for initializing servlet
init() method in a Servlet's lifecycle.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015