In my ListThread class, I first retrieve some of the text fields; i.e., request.getParameter( ... ); Thereafter, I want to pass the request scope together with some parameters to another class; SiteUtil.java., for some further processing. This is what I do:
This is my SiteUtil.java:
Can I pass the request scope and save attributes in the scope this way?
Where you will use that Attribute set in second class. Request scope might not be right place instead HttpSession or ServletContext should be right place to setAtrribute & use it anywhere in session or application. Hope this help. [ April 09, 2004: Message edited by: Nehul Nalekar ]
I have found it more flexible to create another collection from the request, and pass that around as in this example.
With this approach, you can test and use your helper classes outside the servlet environment. Furthermore, you can't keep a request object past the end of the request/response cycle, but you can save that Map for any purpose. Bill
Joined: Dec 10, 2003
Yeah that make sense if you want to save request level info & don't want to save into session or application. You can also save into database but that depends on requirement.