You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mariano <ml...@sescam.org> on 2005/03/18 10:04:45 UTC

How to create object when context app inits and make it accesible to context by JNDI

Hi all, i like to create an object when context app inits and make it
accesible to all context JSPs, classes, etc. by JNDI, i've used <Resource
and <ResourceParams in $CATALINA_HOME/conf/server.xml and <resource-env-ref>
in $CATALINA_HOME/context-app/WEB-INF/web.xml but it creates one new
instance everytime i run:

	Context ic=null;
	try {
		ic=new InitialContext();
	      paramsWeb= (WebAppParams)
ic.lookup("java:comp/env/chua/WebAppParams");
	.
	.
	.
	}

Any ideas?

Thanks in advance

Mariano



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