You are opening a real can of worms :-) The reason struts (and any else framework out there) support the 4 scopes is that those are the four defined by the servlet spec, and thus available in any container.
Of course each application may and many will have some additional requirements. After a week of gathering you'll end up with approx. 500 different scopes, policies and behavioural patterns. You could implement them all and get a super product, unfortunately completely unusable due to interscope dependencies, behaviours and overall complexity. To give you an example, on my current project we have our own session implementation which supports class-private attributes (only readable by the class they belong to, therefore saving us from naming problems) as well as different policies, which can be combined and applied to each attribute like auto-distribution, auto-expiring, auto-persistence, intelligent behaviour (like survive user-state change or a special use-case). This code does good job for us and reduces the complexity of our project, but 90% of struts-powered projects do not care about distribution, why should they pay the penalty of more complicated framework code to support something their don't need? If you want to start a project which performs a better (or more powerful) attribute management than struts does, feel free to do this on java.net or sourceforge (I'd even conribute some code :-)) but don't expect it to become a part of struts anytime. :-) Best wishes Leon On 1/4/07, Asthana, Rahul <[EMAIL PROTECTED]> wrote:
Hi all, Leons posting about the scopes reminded me of something I have been meaning to post. My application is organized into logical modules, such as purchasing,banking, credit , shoppingcart etc. There are some variables that we have to use within a module.So,we added a new scope to our application, which is called "cachemanager" scope. We made changes in org.apache.struts.util.RequestUtils and other classes, so that we can store attributes in "cachemanager" scope. The variables retain their life within a module,so as long as the user is browsing the purchasing module for eg. from /purchasing/purchase_step1.jsp to /purchasing/purchase_step2.jsp ,the variable retains its life, but as soon as the user goes from /purchasing/purchase_step1.jsp to /shoppingcart/choose_1.jsp, the variables in cachemanager scope are cleared.This works for all the struts tags as well. Can struts choose to implement something like this;I am sure this should be a very common requirement. Thanks Rahul --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]