when the webcontainer creates ServeletConfig,ServletContext
objects? befoure creating the Servlet object or not?

Answer Posted / d.murali krishna

when ever a web application (.war file)is deployed in to
running server, immediatly the server reads corresponding
configuration file.


if parsing of that web.xml is succeded, then only
ServeletContext instance is created, other wise
ServletContext instance creation is failed. Then that web
application is not ready to provide services.

When ever a request is given to Servlet first time, first
Servlet instance is created, then its ServletConfig
instance is created.

Is This Answer Correct ?    15 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which java framework is most popular?

576


How do cookies work in servlets?

579


What do you mean by web applications?

625


Which method is called when reference variable is passed in system.net?

1827


Explain the servlet filter.

540






I have a requirement Here we have a ResultSet object that will contain 50 records i need to print those recors in to a webpage(i.e; view according to MVC architectures that mybe servlet or jsp) . Here i need to print the records 10 per page that is 1 to 10 in page one and 11 to 20 in page two like remaining will be appeared in other pages we need to display those page numbers whenever we click on that page number we will go to that page and display 10 records like we will display 5 pages it is like this << 1 2 3 4 5 next >>

2532


What is session tracking?

696


Given the request path below, which are context path, servlet path and path info?

543


Which interface should be implemented by all servlets?

697


What is context in servlet?

538


What is difference between the HTTP Servlet and Generic Servlet? Explain about their methods and parameters?

613


Are Servlets Thread Safe? How to achieve thread safety in servlets?

557


Tell us something about servletconfig interface.

579


What is difference between get and post method?

572


What is cookies in servlet with example?

518