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

What is the difference between encodeRedirectUrl and encodeURL?

615


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 >>

2538


What is servlet and its advantages?

534


What is a cookie What is the difference between session and cookie

607


What is the importance of init() method in Servlet ?

598






Can we get PrintWriter and ServletOutputStream both in a servlet?

667


What are common tasks performed by Servlet Container?

775


I Have A Plan to develop a Project in Struts,I want the template of struts project with Hibernate.Canany body provide me the required information?

2244


Explain the difference between generic servlet and http servlet?

545


What are different methods of session management in servlets?

785


What are the uses of servlets?

626


What is the web server used for running the Servlets?

587


Which event is fired at the time of setting, getting or removing attribute from application scope?

624


how many jsp scripting elements are there and what are those?

548


What do you mean by web applications?

639