• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with EJB injection in JSP

 
Satya Maheshwari
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Senthil Kumar
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i guess you have to specify the JNDI name in the annotation.Also make sure that your jsp container supports Dependency injection
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic