Hey

Tim Yates wrote:
> I then have a JSP page in tomcat/webapps/ROOT/index.jsp which calls a
> javabean (in tomcat/webapps/ROOT/WEB-INF/classes), and this JavaBean
> contains the following code :
> 
>   private CalendarEJBHome home = null ;
> 
>   private void makeHome() {
>     if( home == null ) {
>       try {
>         InitialContext ctx = new InitialContext();
>         Object objref = ctx.lookup( "CalendarEJB" );
>         home = (CalendarEJBHome)PortableRemoteObject.narrow( objref,
> CalendarEJBHome.class ) ;
>       } catch( Exception e ) {
>         lastexception = e.toString() ;
>       }
>     }
>   }
> 
> Bt when the JavaBean tries to call makeHome to tie itself to the CalendarEJB
> EJB, I get the following exception :
> 
> javax.naming.NoInitialContextException:
>   Need to specify class name in environment or system property, or as an
> applet parameter, or in an application resource file:
>     java.naming.factory.initial

You need to include a jndi.properties file in your JSP codebase, or set
the system properties in your Tomcat JVM to those in jndi.properties
(see /conf/default/jndi.properties for details)

/Rickard

-- 
Rickard �berg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to