I tend to put as much of java code into beans as sensefull.
In this case I would create a class that encapsulates
the creation of the context.
Other ways:
- Use an include
- Create and use a tag library
> -----Ursprüngliche Nachricht-----
> Von: Loïc Lefèvre [mailto:llefevre@fivia.com]
> Gesendet: Donnerstag, 7. Februar 2002 14:04
> An: Mailing List Tomcat
> Betreff: EJB - JSP / Properties
<snip/>
> 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?
<snip/>
--
To unsubscribe: <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
|