A Practical Guide for Integrating EJB and Struts : Page 7
EJB and the Struts framework each have received plenty of coverage individually, but what about leveraging EJB and Struts together? This tutorial lays out a complete step-by-step guide to integrating these two technologies.
by Stephen Lum
May 19, 2004
Page 7 of 7
Deploy the Application
You are almost there!
Click the Run menu item, and click Debug. Click JBoss 3.2.x and then click New in the bottom left-hand corner. Under Name, type: JBoss 3.2.3. Under Home Directory, navigate to the location where you unzipped JBoss (see Figure 26).
Click Apply, and then Debug. This will start the JBoss server, which you can see in the Console window.
In the Package Explorer window, right click Stock.ear, and go to Deployment -> Deploy To... . In the popup box, choose (default) and click OK. You will now see a green arrow on the Stock.ear file (see Figure 27).
Figure 27: Deploy the .ear file to Default Directory of JBoss Server
Open a browser and type in http://localhost:8080/stock/pages/stockquery.jsp.
At this point, you can see the application return its data, and you can set breakpoints in the application, including within the StockBean EJB.
Leverage Struts and EJB
You can integrate both Struts and EJB in various ways, using various tools. This tutorial has illustrated just one of the methods. Being able to integrate the two will give you a good foundation for the popular Struts architecture. Perhaps next you'd like to try your luck at building an entity bean within the framework.
If you still have problems with installation, a number of good online resources can walk you through it, including: