tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Charbonneau <tomcat-...@kdesktop.org>
Subject Embedded Tomcat
Date Sat, 25 Oct 2003 21:16:08 GMT
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
tomcat-dev@kdesktop.org
--


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message