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's the use of servletcontext?

692


What is the purpose of requestdispatcher interface?

628


What is the effective way to make sure all the servlets are accessible only when user has a valid session?

577


Define declaration.

630


What are the types of protocols supported by httpservlet ?

719






Which java application server is the best?

564


Write all the phases defined in servlet life cycle?

602


Whats the advantages using servlets over using CGI?

596


What are the servlet events?

604


What is servlet interface?

721


How can we refresh automatically when new data has entered the database?

628


Tell us something about servletconfig interface.

592


Why do we have servlet wrapper classes?

590


What is URL Encoding?

634


Which httpsession object is used to view and manipulate information about a session?

740