Is there any differance b/w getting servlet context from
servlet config and session? if yes then what is that?

Answer Posted / katamraju

Yes, some difference is there b/w servletconfig , servlet
context and session.
ServletContext:This is an interface created by webcontainer
based on class provided by webcontainer wendor,the
webcontainer will be create ServletContext Obj for the whole
web-application.
ServletConfig:This also an inteface and created by
webcontainer based on class provided by webcontainer vendor,
webcontainer creates servlet config obj forevery resource
that is available in webapplication.
session:session can be used to develop stateful application.

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What must be implemented by all servlets?

662


Why filter is used in servlet?

611


What do you mean by chaining in servlet?

677


Is servlet a framework?

626


What are the life cycle methods of a servlet?

681






How to notify an object in session when session is invalidated or timed-out?

713


Why is httpservlet declared abstract?

669


What is the disadvantage of cookies?

655


Explain jsessionid and when is it created?

679


What do you mean by default initialization in java servlet?

693


What is generic servlet class?

686


What are the steps that are required to handle the multi-threading?

692


What do you mean by the servlet chaining?

637


What is the need of session tracking in web application?

662


How do you design microservices?

699