Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-13-2008, 09:22 AM
Member
 
Join Date: Jun 2008
Posts: 1
pcvardhan is on a distinguished road
Basics of Servlet
When does the init() method of the servlet get called:-
When first equest comes to the servlet or when it get deplolyed.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-13-2008, 03:07 PM
Member
 
Join Date: Apr 2008
Posts: 91
javarishi is on a distinguished road
It depends on the Configuration which we did in the web.xml.

If we put load on startup tag inside web.xml and if we mention the

particular servlet inside this tag, at the time of server startup, web -

container will load the servlet class into the memory, and webcontainer

will create the servlet instance by calling the default

constructor. After that container will initialize this servlet by calling init()

method. So All initialization code we can put inside init tag inside the

web.xml, get the ServletConfig Object. These properties of the servlet


will be shared among the clieants.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Doubt in basics of Servlets pooja.gupta84 Java Servlet 4 06-24-2008 07:32 PM
Basics AKP New To Java 7 05-23-2008 01:06 PM
regading jsp basics lpwing JavaServer Pages (JSP) and JSTL 0 01-21-2008 08:52 AM
Session Beans (basics) Java Tip Java Tips 0 12-28-2007 11:43 AM
Multithreading (basics) JavaForums Java Blogs 0 12-17-2007 01:21 PM


All times are GMT +3. The time now is 03:43 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org