Forums Register Login

ServletContextListener !!!

+Pie Number of slices to send: Send
Hi all,
Can anybody help me out in getting these mock questions?

1st question is:
servletContextListner is called if
a.Context is loaded
b.Context is initialized or destroyed

I found option �a� correct in one mock, and in another mock it is given that b is correct..
Please let me know which one to choose�.

2nd question is:
where should the element <taglib-uri>***</taglib-uri> be present
a.Web application
b.TLD
c.DTD
d.Custom tag class



Thanking in advance�
+Pie Number of slices to send: Send
Hi,

1st question is:
servletContextListner is called if
a. Context is loaded
b. Context is initialized or destroyed

I found option �a� correct in one mock, and in another mock it is given that b is correct..
Please let me know which one to choose�.

2nd question is:
where should the element <taglib-uri>***</taglib-uri> be present
a. Web application
b. TLD
c. DTD
d. Custom tag class



The ServletContextListener is called at the time of initialize and destroy of context. I think loading of context is broad term. The contextInitialized method of this listener is called at the time of initialization of context and at the time of destruction the contextDestroyed method is called.

<taglib-uri> element should be present in DTD that is web.xml under <jsp-config> element. But this element is not required as per Servlet Specificatin 2.4

Thanks
She'll be back. I'm just gonna wait here. With this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 463 times.
Similar Threads
Surprise question ..<tablib attributes
some doubts..
Mock Exam Question
<taglib> and uri doubt
tag library deployed as .jar required web.xml mapping??
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 00:42:20.