Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

init method  RSS feed

 
suman deb
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

can we override an init method of a servlet?
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The init methods are designed to be overridden.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Clarification:
public void init(ServletConfig config) can be overridden, but the API says:
When overriding this form of the method, call super.init(config).

public void init() is designed to be overridden. The API says:
A convenience method which can be overridden so that there's no need to call super.init(config).

http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/GenericServlet.html
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You deleted and reposted your comment? Heh, busted

[edit] Now you're just playing with my mind...
[ August 18, 2005: Message edited by: David O'Meara ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by David O'Meara:
You deleted and reposted your comment? Heh, busted

[edit] Now you're just playing with my mind...

[ August 18, 2005: Message edited by: David O'Meara ]


You were doing a better job explaining it so I got out of your way.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The API is your friend
 
Gilberto
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not using init usually leads to underperformed applications!


--------------------------------------
Domingo Sebastian
SJCP
http://www.prestigevillas.com
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!