EJB programming & troubleshooting: EJB and Struts
i am new to struts. i developed some examples on it. now i want to use struts with EJB. i am trying to call an EJB from ActionClass but getting errors. can you suggest any site where i can look into a posted example and try it.
- EJB and Struts by Web Master on December 19 2002 07:26 EST
- EJB and Struts by Joseph Agunpopo on December 21 2002 21:47 EST
- Struts and EJB by s s on May 21 2004 09:22 EDT
- Re: EJB and Struts by Baradha Chakkaravarthy on February 02 2007 03:35 EST
Looking up and using an EJB from a Struts Action class is no different than doing it from anywhere else. Struts is not the problem (assuming your exception is truly EJB related). Are you able to use your EJB from a plain java class or a Servlet?
If you post your error or describe it a little more, you may get an quick answer.
i solved the problem and able to run the example on struts with EJB. auctually the problem was i made a .ear and kept the Action Classes in .jar where ejbs classes reside rather than in .war WEB-INF/classes . after that i corrected by keeping Action Classes in .war WEB-INF/classes and deployed and run the example.
thanks for your immediate reply.
Struts is just a very light weight framework.
Its too generic and one need not worry about where and when to make EJB calls or SQL calls.
I would strongly suggest that you look in to the PetStore J2EE blueprints MVC model, it is more adapted to J2EE projects.
Hi ramakrishna, Can u please tell me the steps you have used to deploy.I have tried using DEV site but I want something easier to write and understand. Thanks in advance, Sita
Hi I can't help to notice that that you are also a novice to the world of strut. I was just wondering if you might be able to share some light with me in regard to using strut to develop a web page.
send me your mail id to me firstname.lastname@example.org
my email id is jagunpopo at yahoo dot com. pls get in touch.
There is a good tutorial here:
Hi do any have the sample for integrating Struts and EJB. I have tried working with the sample provided as in the devx.com but my .war file is getting deployed but I get 404 Page not found error when I get the URL as http://localhost:8080/stock/pages/stockquery.jsp. Like I am not clear what is the problem as the log file is also clean with out any error msgs. If any one could able to help me out it would be helpful.. Thank you in advance