I believe the preferred way to do this is to put it in a properties file and
do it that way. makes it more vendor independent, since you can just change
the properties file.

Al

----- Original Message -----
From: Tung Bui <[EMAIL PROTECTED]>
To: Orion-Interest <[EMAIL PROTECTED]>
Sent: Monday, May 22, 2000 7:52 PM
Subject: Look up a EJB from a JSP?


> Hi, as part of my learning, I tried to implement a dynamic page as follow:
> JSP<->Java Bean<->EJB<->JDBC. I got it works as intended however with a
> hack. Within the my Java Bean, in order to look up the EJB bean
> successfully, I have to hard code the context info as follow:
>     Hashtable env = new Hashtable();
>     env.put(Context.INITIAL_CONTEXT_FACTORY,
>             "com.evermind.server.ApplicationClientInitialContextFactory");
>     env.put(Context.PROVIDER_URL,"ormi://localhost/linkcontent");
>     env.put(Context.SECURITY_PRINCIPAL,"xxxx");
>     env.put(Context.SECURITY_CREDENTIALS,"xxxx");
>     Context ctx = new InitialContext(env);
> Which is not an ideal way. I'm having trouble from figuring out how to set
> these information up so that I do not have to hard code this way. Any
idea?
>
> Thanks,
> Tung
>


Reply via email to