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
What is the default http method in the servlet?
What is the difference between forward () and sendredirect () functions in servlet? Explain
Why is servlet used?
Describe servlet?
What do you mean by servlet?
What is Servlets and explain the advantages of Servlet life cycle?
What is meant by servlet? What are the parameters of the service method?
Tell the new features added in servletrequest interface i.e. Servlet 2.4
Explain jsessionid?
What are the differences between servlet context vs servlet config?
What methodology can be followed to store more number of objects in a remote server?
Why do we need servlet filter?
What is the use of httpservletrequestwrapper?
what do you understand by url rewriting?
How do you design microservices?