tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Loïc Lefèvre <>
Subject EJB - JSP / Properties
Date Thu, 07 Feb 2002 13:03:38 GMT
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:   <>
For additional commands: <>
Troubles with the list: <>

View raw message