Web project with eclipse, JBOSS application serv and the jboss IDE
This Tutorial explains the creation and deployment of web project to jboss. We use the free eclipse plugin JBOSS IDE.
Date: December, 21th 2004
Jboss IDE 1.4
Jboss Server 3.2.5
PDF Version of the Tutorial
The following software packages must be downloaded.
Eclipse SDK 3.0
Jboss IDE 1.4.0
Jboss Server 3.2.5
Table of Content
Web project with eclipse and the jboss IDE 1
Installation of eclipse 1
Installation of the jboss IDE 1
Configuration of jboss IDE 2
Testing the settings 2
Stop the jboss server 4
Create a web project 4
Dummy index page 6
Configuration for packaging 7
Run the packaging process 9
Deployment of the project. 9
Start the jboss server 11
Installation of eclipse
The installation of Eclipse is done with the
unpacking of the archive file.
(It is advisable to put a link of the eclipse.exe to your desktop or your startmenu)
Installation of the jboss IDE
Extract the archiv file of the jboss IDE and copy the two included folders features and plugins in the folder of eclipse
Configuration of jboss IDE
Restart / Start eclipse. You will find the
following symbol in the menubar.
Choose the menu option Debug...
In the configurations, click with the right mouse button on Jboss Server Version (Jboss 3.2.x) and choose New.
Set a name for this configuration and set the home directory of the jboss server. Press the Apply button to save the settings.
Testing the settings
To be sure that the entered settings are correct, we will start the jboss in the debug mode. Click on the button Debug in the dialog window.
The console shows the following.
Stop the jboss server
Right mouse button on the console and choose the option Terminate or click on the terminate symbol in the menu bar of the console.
Create a web project
First choose the Java perspective.
Now the package explorer should be on the left site of eclipse.
Create a new projekt > File > New > Project or in the package explorer right mouse button > New > Project.
Choose on JbossIDE the option > J2EE 1.4 Project.
Set the project name to WebTutorial.
Create a new source folder and set the name to src. In the package explorer right mouse button on the project > New > Source Folder.
Dummy index page
Create a index.jsp in the directory WebRoot.
Press Strg+n and choose JSP.
Change the JSP file:
<%@page contentType="text/html" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Welcome to your programm
The jboss IDE includes an option to build a package from the source project that can be deployed (transfered to the jboss server) later.
Open the project properties and in the right window choose the option Packaging Configuration.
Set the name of the archiv (recommended is the same as the project name).
Add the two folders bin and WebRoot
to the archiv.
Right mouse button on the archiv > Add Folder.
In the next step add the web.xml file of
the directory /WebTutorial/WebRoot/WEB-INF/.
Right mouse button on the archiv. In the context menu select Add File. Later the web.xml must be placed in the folder WEB-INF of the war-archiv, so set the prefix to WEB-INF.
After this the following elements can be found in the archiv.
Run the packaging process
In the package explorer click with the right mouse button on the project and choose Run Packaging, in order to build a war archiv from the source project. The following output wil be found in the console.
The war archiv is created in the project.
Deployment of the project.
Click with the right mouse button on the war archiv file and choose Deploment > Deploy to... from the context menu. Select the default deployment folder as Target Choise.
A small gree arrow on the archiv file shows that the file was deployed.
Start the jboss server
In order to run the jboss server, click on the debug symbol in the menu bar of eclipse.
Congratulations. You have increased your knowledge once again.