struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Cavaness <chuckcavan...@attbi.com>
Subject Re: Global object
Date Mon, 01 Apr 2002 17:39:38 GMT
I don't think you'll find anything explicitly in the Struts framework. 
Obviously, you can use the ServletContext to store a Map object that 
everyone would have access to. However, this does couple it to the servlet 
layer, since it's stored in the ServletContext for the web app. Another 
idea might be to create an object that implements the Singleton pattern and 
allow it to hold onto the Map. With this approach, it's not coupled to the 
web tier, but is just an ordinary Java class.

Chuck

At 11:32 AM 4/1/2002 -0600, you wrote:
>I sent this item a sometime ago but no response...but here it goes again.
>
>
>
>Here is my problem, I have a java bean class that keeps track of who changes
>what on the table (e.g. modifiedby).  When a caller class changes something
>to the underlying table, I want to know who.  The problem is that this Java
>bean class doesn't have access to the session object.  In addition, I want
>to keep servlet layer separated from the backend java bean layer.  Again,
>does Struts have some kinds of global dictionary object so I can keep
>information in there and ask for it when I need it...this dictionary object
>should be available to everyone?
>
>
>
>Thank You,
>
>Hai Hoang
>
>
>
>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message