This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts2.1.6 & EJB3.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2.1.6 & EJB3.1" Watch "Struts2.1.6 & EJB3.1" New topic
Author

Struts2.1.6 & EJB3.1

Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
Just wondering very quickly, if anyone has any examples of Struts2 & EJB3.1 working together.

I have tried just Injecting a EJB bean into a Struts Action but I get a NullPointerException

I found another thread on this forum where someone said use somethink like this:


javax.naming.NamingException: Lookup failed for 'com.myproject.bear.session.ITestSessionBean' in SerialContext [Root exception is javax.naming.NameNotFoundException: com.myproject.bear.session.ITestSessionBean not found]|#]

Can it be done and if so, anyone know how?

Cheers in advance

KS
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9307
    
  17

Try this plugin to inject EJBs into your struts 2 actions. This tutorial on use of guice plug-in might also be helpful...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
Cheers for that, will do.
Viji San
Ranch Hand

Joined: Aug 12, 2010
Posts: 35
Is this project dead or Am I checking in incorrect link ?? I find no downloads in the link http://code.google.com/p/struts2ejb3/downloads/list

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts2.1.6 & EJB3.1