What is the difference between servlet config and servlet
context.
Answer Posted / khushbu ajmera
A: ServletContext: Defines a set of methods that a servlet
uses to communicate with its servlet container, for example,
to get the MIME type of a file, dispatch requests, or write
to a log file.The ServletContext object is contained within
the ServletConfig object, which the Web server provides the
servlet when the servlet is initialized
ServletConfig: The object created after a servlet is
instantiated and its default constructor is read. It is
created to pass initialization information to the servlet.
| Is This Answer Correct ? | 13 Yes | 7 No |
Post New Answer View All Answers
How many objects of a servlet is created?
How will two or three servlets interact or communicate with each other?
What is meant by session? Tell me something about httpsession class?
What are the benefits of using servlet over cgi?
Differentiate between the print writer and servlet output stream?
How do we go with database connection and log4j integration in servlet?
Differentiate between the get and post method
How do you communicate in between Applets and Servlets?
What's the difference between servlets and applets?
How does java thread pool work?
What is Servlet API used for connecting database?
What is a servlet?
Why don't we write a constructor in a servlet?
Can we use threads in Servlets?
What is the structure of the http response