On Fri, 4 Jan 2002, Ann Mary wrote: > Hi, > Thank u for all ur answers. So there is no other way except giving a > req to the servlet, to call the init() function ??
Your question is confused, it might be better if you gave more detail as to exactly what you are trying to do so people can better address your question. The init() method *is* called when the servlet is loaded -- this normally takes place when the servlet is first called (i.e. the first request for it), but you can also have it be done when the servlet container is started up by using a load-on-startup parameter in the servlet definition in the web.xml file. What makes you think it is not being called? > --- Nitin Goyal <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > You can use a constructor for the servlet in order to implement > > this functionality. However the constructor is called only when > > the servlet in instantiated, not initialized. The init() is > > called only AFTER the servlet has been instantiated. > > > > > > ----- Original Message ----- > > From: "Ann Mary" <[EMAIL PROTECTED]> > > > > Hi All, > > > > I have a problem at hand, is there any way to call the init() > > method of the servlet when the servlet is loaded. The purpose is > > that i have to call a method from that servlet to register it to > > server in a different location. > > > > Thanx in advance, > > > > Ann Milt Epstein Research Programmer Software/Systems Development Group Computing and Communications Services Office (CCSO) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED] ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
