This content has been marked as final.
Show 1 reply
-
1. Re: Servlet client unable to access SessionBean method
kalyan120 Feb 18, 2005 1:14 AM (in response to bea)You have to declare Libro sal, outside the try,catch block. Otherwise it's not visible to the statements outside the block.
Libro sal = null;
try
{
Context contexto = new InitialContext();
Object ref = contexto.lookup("Libro");
LibroHome home =
(LibroHome) PortableRemoteObject.narrow(ref,Beans.LibroHome.class);
sal = home.create();
}
catch (Exception e)
{
e.printStackTrace();
}
sal.saluda();
out.println("");
out.close();
Thanks,
Kalyan.