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 the include() and forward() methods?

573


What is the process to implement doget and dopost methods?

550


Can we fetch the attributes related to a servlet on a different servlet?

638


What is difference between cookies and httpsession?

549


What methodology can be followed to store more number of objects in a remote server?

1822






What is a web application and what is it’s directory structure?

588


Can servlet have a constructor ?

599


Is servlet synchronized?

607


How do we go with database connection and log4j integration in servlet?

710


What do you mean by the servlet chaining?

549


Which is better jsp or servlet?

560


What are the steps involved in placing a servlet within a package?

593


How do you invoke a servelt?

630


What is the procedure for initializing a servlet?

549


Describe in brief RequestDespatcher?

596