|
-
September 27th, 2000, 03:36 AM
#1
function for every request
Hi,
I am making a servlet in which I have made user defined functions eg myfunction(). Now doGet()
is instantiated for every request and it is calling myfunction().I want to know whether myfunction() too, would be instantiated every time ,or not?
Thanks in advance.
Monika
-
October 1st, 2000, 04:21 PM
#2
Re: function for every request
In java a method is never instantiated. What is instantiated is a class.
In case of servlets... normal servlet will be instantiated only ONCE. After that there will be different threads for each request which will run methods in that class (like multi-threading).
If you make the servlet 'Single-Threaded', then also that servlet 'class' is instantiated for each request and not only specified method.
- UnicMan
http://members.tripod.com/unicman
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|