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 are the life cycle methods of a servlet?

587


How to create war file?

611


What is Request Dispatcher?

796


How can you run a servlet program?

599


Explain the lifecycle of a servlet?

502






How will you pass values from HTML page to the servlet?

552


Why do we have servlet wrapper classes?

573


How the typical servlet code look like ?

635


What is servlet and list its types?

538


Tell us something about servletconfig interface.

578


What are sessions in servlets?

572


How can we include static files in the jsp page?

607


Explain in brief the directory structure of a web application?

566


What’s the difference between forward() and sendredirect() methods?

572


What are the exceptions thrown by servlets? Why?

620