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
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
when the container instatiates the servlet will it
Joined: Nov 30, 2006
Dec 14, 2006 07:18:00
well,i want to know that when the container instatiates the
calls a default constructor and if so of which
class constructor will it call is it HttpServlet/GenericServlet.
Joined: Mar 06, 2001
Dec 14, 2006 07:56:00
You're concentrating on the wrong thing. I don't think I have ever created a constructor for a servlet, or even worried about it.
The container instanitates the servlet, you don't worry about this.
The container initialises the servlet - this is where you come in.
Joined: Feb 24, 2006
Dec 14, 2006 08:00:00
I would say three constructors ?
I don't think I have ever created a constructor for a servlet, or even worried about it.
I agree. You could use the init method instead to instantiate whatever you want.
[ December 14, 2006: Message edited by: John Meyers ]
SCJP 6 articles
SCJP 5/6 mock exams
More SCJP Mocks
Author and ninkuma
Joined: Jan 10, 2002
Dec 14, 2006 09:04:00
Please do not ask the same question more than once. I am closing this instance of the topic.
Asking smart questions
Books by Bear
I agree. Here's the link:
subject: when the container instatiates the servlet will it
Can i write a constructor in my servlet
usage of servlet init() method and servlet constructor
in simple servlet ,why a constructor has super()?.
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-2014