aspose file tools*
The moose likes Servlets and the fly likes Request-scoped data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Request-scoped data" Watch "Request-scoped data" New topic
Author

Request-scoped data

Keith Hankin
Greenhorn

Joined: Jun 16, 2004
Posts: 1
I want to have data with request scope where I can control the lifecycle. Obviously I can determine when the data is first added to the request, so I know the beginning of the lifecycle. However, how do I know when the lifecycle is over? I don't want each JSP and Servlet to have to know if it is the last user of the request in order to explicitly do end-of-life cleanup. Is there some other way I can do this?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


I don't want each JSP and Servlet to have to know if it is the last user of the request

HTTP request are per user. They don't get reused. So in a servlet context the end of a request is effectively once the service() method has run.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Request-scoped data