I've successfully embedded Tomcat into my application and have talked to a few 
people about how to shared objects between the application and the JSPs from 
the contexts I've defined.  I've had a suggested to use JNDI but this seems a 
little more elaborate than I need, and someone else was talking about using 
ServletContext.setAttribute() and ServletContext.getAttribute()

Is there a code example both application side and web side somewhere that 
could show me how to do this?  I've been wrestling with this for a while and 
it's starting to irritate me.  :)

I've embedded Tomcat for the sole purpose of being able to create JSPs and 
Servlets that can examine the properties of the application and modify the 
properties as well.  For example, I need to be able to do the following in my 
JSP.

MyApplication app = <someway of getting access to the instantiated object>;

Object obj = app.getSomeData();
obj.modifyInSomeWay();
app.setSomeData(obj);

If anyone can provide an example for this, I would very much appreciate it.

Thanks.

--
Robert Charbonneau
[EMAIL PROTECTED]
--


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to