A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
EJB Certification (SCBCD/OCPJBCD)
Problem with EJB injection in JSP
Joined: Jan 01, 2007
Aug 20, 2007 03:07:00
I am trying to inject a session bean in a
<%! @EJB private SessionRemote mySessionBean; %>
But mySessionBean always points to null when I execute the JSP. Is this a correct way to inject
in a JSP? Any pointers on this would be greatly appreciated.
Thanks and Regards
Joined: Mar 13, 2006
Aug 20, 2007 06:44:00
i guess you have to specify the JNDI name in the annotation.Also make sure that your jsp container supports Dependency injection
when you really want something, all the universe always conspires in your favour.<br /> <br />SCJP1.5-77%<br />SCWCD-89%
subject: Problem with EJB injection in JSP
ManagedBean with SessionBean?
@EJB doing nothing - jboss-4.2.2.GA
question about default jndi name
@EJB annotation from servlet and JBoss
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014