wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes regarding the listener interfaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "regarding the listener interfaces" Watch "regarding the listener interfaces" New topic
Author

regarding the listener interfaces

abhishek tiwari
Greenhorn

Joined: Aug 08, 2005
Posts: 19
hi guys,
i have some doubts from the chapter on attributes adn listeners.the page number is 182 where the eight listeners have been mentioned along with their functions.following are my queries :-

(a)what is the differnce between a request attribute and a session attribute

(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)?

that's it for now.hope you will help me out of this.

thanks in anticipation


when the going gets easy,you are going downhill.......<br /> <br />abhishek tiwari<br />scjp 93%<br />scwcd in progress
Karthik Rajendiran
Ranch Hand

Joined: Aug 13, 2004
Posts: 211
Hello,
A servlet context exist for a web application per JVM in a distributed environment.

Lets not go to that. In a non-distributed environment, we have Servlet context created by container. if you want to do some operations at the time of servlet context creation,i.e even before the web resource is served to client [client request], like initialising datasource or reading some properties file, you implement the servletContextListener.

Where Session and request can be triggered with respect to client request.

When Request is sent , if the request listener is implemented , the corresponding method is called.

Similarly when the session is created , the sessionCreated method is called.
I think it is more self explanatory.

Can you post your doubt in more detail way?


SCJP 1.4 SCWCD 1.4 SCDJWS 1.4
abhishek tiwari
Greenhorn

Joined: Aug 08, 2005
Posts: 19
hi karthik,
first of all thanks for the reply.even i felt that the question was not framed in a proper manner but still you did a good job.

can i have your email id for further correspondence.

my email id is meetabhishek_t@yahoo.co.in

thanks once again for your instant response[ ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: regarding the listener interfaces
 
Similar Threads
Transaction timeout in EJB
Request dispatch from one web app to another
how is the flow in this JSP
Parameter passing from one app (EAR) to another EAR
regarding the listener interfaces