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
Write a hello world program using servlets.
What is the web server used for running the Servlets?
How can we upload the file to the server using servlet?
Which HTTP method is non-idempotent?
Are Servlets Thread Safe? How to achieve thread safety in servlets?
How does tomcat servlet container work?
What is cgi?
What do you mean by request dispatcher in servlet? Also explain its methods.
What are the differences between servlet context vs servlet config?
Explain the custom jsp tags and the beans.
How can the session in servlet can be destroyed?
What are the different methods involved in the process of session management in servlets?
How is a servlet implemented in code?
What is the difference between 2 types of servlets?
How can you push data from an Applet to a Servlet?