File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Problem with EJB injection in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Problem with EJB injection in JSP" Watch "Problem with EJB injection in JSP" New topic
Author

Problem with EJB injection in JSP

Satya Maheshwari
Ranch Hand

Joined: Jan 01, 2007
Posts: 368
Hi
I am trying to inject a session bean in a JSP as follows:



But mySessionBean always points to null when I execute the JSP. Is this a correct way to inject EJB in a JSP? Any pointers on this would be greatly appreciated.


Thanks and Regards
Senthil Kumar
Ranch Hand

Joined: Mar 13, 2006
Posts: 264
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%
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with EJB injection in JSP