File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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
 
Similar Threads
background process
when and how all methods of servlet are called
JSF Request Processing Lifecycle Basics
Who has the focus?
JSF ValueChange problems and Default method where the form submits to