Browse DevX
Sign up for e-mail newsletters from DevX


JBoss Meets Eclipse: Introducing the JBoss-IDE : Page 4

The wildly popular J2EE application server goes from full steam to mainstream with a GUI-based IDE that plugs into the Eclipse development framework.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

Setting Up the Packaging Configuration
Before you can deploy your application to JBoss, you need to define the structure of your WAR file through a Packaging Configuration, which you then run to create a WAR file.

Figure 6: Here's how to define the packaging configuration, from inside the project properties.

Here's how to create a Packaging Configuration:

  1. Right click on your project in the Package Explorer.
  2. Select Properties—>Packaging Configurations.
  3. Right click in the right frame and click Add Std. Archive.
  4. Select Standard-WAR.war and click OK.
  5. Right click on the configuration and click Edit.
  6. Rename it to helloworld.war.
  7. Expand the configuration.
  8. Right click on the line with Manifest.MF and remove it.
  9. Make sure your configuration looks like that shown in Figure 6.

Click OK and you should see a file in your project called packaging-build.xml.

Figure 7: The Target Choice screen allows you to select the instance of JBoss to which you wish to deploy.

Creating and Deploying the WAR File
Create a WAR file by right-clicking on your project and clicking Run Packaging. You will have to right-click on the project and click Refresh before you see the WAR file. The file should be in the top level of you project.

Right click on the WAR file, select Deployment, and then Deploy To. You will see a Target Choice dialog appear, allowing you to select which application server you would like to deploy to, as shown in Figure 7.

Figure 8: Test out the Hello World Servlet! Do your results match?

I have JBoss 3.2.2 and JBoss 3.2.3 configured on my machine, thus both servers are available. After selecting the target you wish to deploy to, you should see a dialog that confirms that the application was deployed.

Now, pull up your Web browser and try it out. Go to http://localhost:8080/helloworld/Hello, as shown in Figure 8.

In this article, you learned how to install the JBoss-IDE plugin in Eclipse. You also learned how to configure a JBoss server and how to package and deploy a simple application that server. Keep a lookout for a follow-up to this article in which I will show you how to use the XDoclet features of the JBoss-IDE plugin.

Javid Jamae is the president of Jamae Consulting, a software development and consulting firm that provides business, training, and development services to large and small companies. Reach him by e-mail here.
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date