About Question enthuware.jwpv6.2.721 :
Moderator: admin
-
- Posts: 12
- Joined: Fri Aug 15, 2014 10:16 am
- Contact:
About Question enthuware.jwpv6.2.721 :
As I know, the servlet engine will not create an instance, unless a request for that servlet is made. And if their is a request, the service method of that servlet is getting called.
According to that, option one also should be a correct answer.
what am i missing.... ?
According to that, option one also should be a correct answer.
what am i missing.... ?
Online
-
- Site Admin
- Posts: 10272
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.jwpv6.2.721 :
The question doesn't say that a request has been made for the servlet.
If you like our products and services, please help us by posting your review here.
-
- Posts: 12
- Joined: Fri Aug 15, 2014 10:16 am
- Contact:
Re: About Question enthuware.jwpv6.2.721 :
Actually the question saying;
If their is an instance of a servlet in the container, it convincing at-least one request for that servlet has been made. it means the service method of the instance has also been called. Then option one also getting a correct answer.
I'm just telling my point, thank you.
and one of the explanation saying;Assuming that the Servlet Container has just called the destroy() method of a servlet instance,
Then my point is;destroy() method is called only if the servlet was made ready to service request,which means, its init() method was called.
If their is an instance of a servlet in the container, it convincing at-least one request for that servlet has been made. it means the service method of the instance has also been called. Then option one also getting a correct answer.
I'm just telling my point, thank you.
Online
-
- Site Admin
- Posts: 10272
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.jwpv6.2.721 :
I understand your point but it is not correct. "servlet was made ready to service request" doesn't mean there was a request. A servlet can be pre-loaded as well (without any request) at the time of startup of a webapp.
If you like our products and services, please help us by posting your review here.
-
- Posts: 12
- Joined: Fri Aug 15, 2014 10:16 am
- Contact:
Re: About Question enthuware.jwpv6.2.721 :
I got it.
Their is a tag for use in web.xml to load an instance of servlert on start-up.
***<load-on-startup>***
Thanks Mr.Paul
Their is a tag for use in web.xml to load an instance of servlert on start-up.
***<load-on-startup>***
Thanks Mr.Paul
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
Re: About Question enthuware.jwpv6.2.721 :
There are no container threads running over this instance's service method.
Question : does it mean that destroy would not be called unless complete is called on AsyncContext?
Question : does it mean that destroy would not be called unless complete is called on AsyncContext?
Online
-
- Site Admin
- Posts: 10272
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.jwpv6.2.721 :
Yes, if the servlet is still in the middle of processing a request, destroy will not be called.
If you like our products and services, please help us by posting your review here.
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
Who is online
Users browsing this forum: No registered users and 2 guests