| Author |
ServletConfig : is it created one for each servlet?
|
Sekhar Kadiyala
Ranch Hand
Joined: Feb 17, 2004
Posts: 170
|
|
ServletConfig object is created one for each servlet or one for each instance. When i mean instance, i guess, we can create multiple instances for the same servlet. Thanks in advance!
|
PMP CSQA SCJP SCWCD SCBCD INS 21 INS 23
|
 |
Bin Gao
Greenhorn
Joined: Jul 23, 2004
Posts: 12
|
|
I think that the servlet container should create one servletConfig for each servlet instance. We can see the protype of function init: public init(ServletConfig servletConfig); When one servlet is created, the init(ServletConfig) will be called once.
|
 |
Kaspar Minosiantz
Ranch Hand
Joined: Sep 25, 2003
Posts: 36
|
|
IMHO ServletConfig object is created one for each servlet . For instance when we create OurServlet inherits an implementation of ServletConfig form GenericServlet [ August 19, 2004: Message edited by: Kaspar Minosiantz ]
|
SCJP 1.4 SCWCD 1.4 <a href="http://www.jroller.com/page/kaspar_ru" target="_blank" rel="nofollow">blog</a>
|
 |
Ian Perkins
Greenhorn
Joined: Dec 18, 2003
Posts: 19
|
|
The servlet container will only create one instance of each servlet; that is why writing thread-safe code is so important... Therefore, by definition, there can only be one ServletConfig for each servlet.
|
 |
 |
|
|
subject: ServletConfig : is it created one for each servlet?
|
|
|