Hello,
How can I do a dependency injection of and EJB into a jsp?
When Iu2019m trying to used it (see below), It doesnu2019t work, What Iu2019m doing wrong?
Also I tried to do a lookup, but I canu2019t do a cast because the classe returned by the lookup is some Proxy class and the only way that Iu2019ve find to access the EJBu2019s methods is through reflection.
Regards,
Janeth
@EJB (name = "crystal.com.co/captura_produccion_ear/CapturaPrimeraEjbBean")
private CapturaPrimeraEjbRemote capPrimeraEjbRemote;
if (capPrimeraEjbRemote != null) {
capPrimeraEjbRemote.test();
}
else{
out.println("null");
}