A servlet is a Class, so yes you can call the constructor. The servlet is designed to run inside a container, however, and the container only knows how to interact with the servlet in certain ways, and it also expects the servlet to behave in particular ways in response to those interactions.
Servlets are not supposed to use constructors, so while while it is valid it is not really a 'servlet' thing to do. [ June 11, 2008: Message edited by: David O'Meara ]
subject: can i called the constructor in servlet file?If Yes how can?If no why?