You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Loïc Lefèvre <ll...@fivia.com> on 2002/02/07 14:03:38 UTC

EJB - JSP / Properties

Hi all,
>From your point of view, what is the best way to
declare properties to use into a JSP page, for
example if I want to call an EJB from my JSP page
I have to do (and in each JSP page in fact):

Properties props = (Properties)System.getProperties().clone();
props.setProperty( "java.naming.factory.initial",
                   "org.jnp.interfaces.NamingContextFactory" );
props.setProperty( "java.naming.provider.url", "localhost" );
props.setProperty( "java.naming.factory.url.pkgs",
                   "org.jboss.naming:org.jnp.interfaces" );

InitialContext jndiContext = new InitialContext( props );

Is there any way beautifuler to do that?
In the web.xml file?

Thanks in advance,
Loïc Lefèvre



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>