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 do I support both get and post from the same servlet?
What do you understand by mime type?
What is difference between the HTTP Servlet and Generic Servlet? Explain about their methods and parameters?
Are Servlets Thread Safe? How to achieve thread safety in servlets?
Can you create a deadlock condition on a servlet?
How to handle exceptions thrown by application with another servlet?
How can we upload the file to the server using servlet?
What must be implemented by all servlets?
what is the different between a servlet and a cgi? Why do you go for servlet rather than cgi?
Describe the phases of servlet lifecycle?
What is servlet used for?
What is api in servlet?
When jsessionid is created?
Is it possible to have a constructor inside the servlet?
What is the capacity the doget can send to the server?