Hello,
I've deployed a simple SessionBean with jndi name="Libro"
I've written a servlet, the client of the EJB, which tries to access to
"saluda()", the method of the EJB. I get the following error when I compile the
client:
cannot find symbol
symbol: variable sal
location: myServlet
sal.saluda();
Here is the code for the servlet:
res.setContentType("text/html");
PrintWriter out = res.getWriter();
out.println("");
out.println(" Cliente EJB ");
out.println("");
try
{
Context contexto = new InitialContext();
Object ref = contexto.lookup("Libro");
LibroHome home =
(LibroHome) PortableRemoteObject.narrow(ref,Beans.LibroHome.class);
Libro sal = home.create();
}
catch (Exception e)
{
e.printStackTrace();
}
sal.saluda();//<---------HERE IS THE ERROR
out.println("");
out.close();
The "saluda()" method only prints a greeting, it's quite simple.
I don't know what is wrong? maybe the package?? I'm really confused :S
Any help will be welcome
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3866797#3866797
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3866797
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user