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 can we perform any action at the time of deploying the project?
What is called servlet container?
Explain the different ways for servlet authentication?
Whats the advantages using servlets over using CGI?
Write a servlet to upload file on server.
How can you use a servlet to generate a plain text instead of html?
How the JSP file will be executed on the Server side?
What are common tasks performed by Servlet Container?
How forward () method is different from send redirect () method?
how the HTML data stored in web server?
Which java framework is most popular?
What is servletconfig?
What is a servlet-to-servlet communcation?
What do you mean by annotations in servlet?
Explain the difference between servlet and cgi?