Hi
in answer to your questions
(a)what is the differnce between a request attribute and a session attribute
a Request attribute is part of a request (HttpServletRequest). That is it is set and obtained via the methods HttpServletRequest.getAttribute and HttpServletRequest.setAttribute. A session attribute is part of the session (HttpSession). A session attribute is set and obtained via the methods HttpSession.getAttribute() and HttpSession.setAttribute(). Note that the same attribute can be store on both the Request and Session.
b)for the ServletContextListener interface the scenario mentioned is that it is used to know if a context has been created or destroyed. how can one create/destroy context(i'm not able to get the meaning of context)?
The meaning of Context in this case is web application. So with
Tomcat for example contextInitialized will be called when the web application is loaded and the web.xml file is parsed, and contextDestroyed will be called as the web application is shut down. This is usually when you start and stop Tomcat, but if you use the Tomcat Manager then you can start, stop, and redeploy a web applications on an application by application basis and these would also call those methods (contextInitialized and contextDestroyed)
HTH Mat