td>
TR>
TABLE>
form>
body>
html>
J2EE application project:
To complete the J2EE project, we have to add some additional files. In 'application.xml' profile, this file is a configuration document for the J2EE project, refers to EJB packets and WAR Pack of the package.
The detailed code of 'Application.xml' is as follows:
XML Version = "1.0" encoding = "UTF-8"?>
Sum Application display-name>
FIBOEJB.JAR EJB>
module>
Fiboweb.war web-uri>
/ FIBO context-root>
web>
module>
application>
Package:
JBoss-IDE has a very convenient package setting, and is not limited. In the tutorial, the package setting will be set:
l An EJB JAR file. This file has EJB class, interface, and deployment files.
l A JAR file of an EJB client. Interface with EJB.
l A WAR file for a web app. There is a servlet, an EJB client's JAR and deployment profile.
l A JAR file for a J2EE project. There is an EJB JAR, Web App War, and deployment files.
When started, these four package settings generate J2EE project deployments.
Right-click the item to select 'Properties' ->' packaging configurations'. Tap 'add archive' in the right hand side window. Enter 'fiboejb.jar' and press' OK '. Now add a package settings generate' FIBOEJB. Jar 'file.
Now we have to add EJB classes and interfaces in 'fiboejb.jar', and those files in the 'src / bin' data clip (such as the output of the preset project). First choose 'FIBOEJB. Jar' Select 'add folder' in the right hand. In the pop-up window, you can choose a built-in or external folder, including or excluded files, pre-word, etc. Select 'Project Folder' -> '/ Tutorial / Bin '->' ok '. Included Fill in' Tutorial / EJB / *. Class, Tutorial / Interfaces / *. Class' -> 'OK'.
We want to deploy documents in 'Fiboejb.jar' Riga, choose 'FIBOEJB. Jar' to choose 'add file' in the right hand on the right. You can choose a built-in or external file in the pop-up window. Words and other settings. Choose 'Project File' -> '/Tutorial/Src/meta-inf/ejb-jar.xml' -> 'OK'. Prefix fills in 'meta-inf' -> 'OK '.
The above movement, this time the file is selected 'jboss.xml', the other, the package 'fiboejb.jar' is completed, as shown below:
Follow us to add an EJB client package setting. Datong, right-click on the right hand side window selection 'add archive'. Enter 'fiboejb-client.jar' to choose 'OK', then click 'Fiboejb-Client.jar' Add Folder 'Press' / Tutorial / Bin' in 'Project Folder', in 'Includes' Enter' Tutorial / Interfaces / *. Class' -> 'OK'. EJB Client's package has been completed:
Follow us to add a WAR package setting for Web App. Datong, right click on the right hand side window selection 'add archive'. Enter 'fiboweb.war' to choose 'OK', then click 'Fiboweb.war' Choose 'Add FiboWar' Press 'Project Folder' to select '/ tutorial / bin', in 'include' input 'tutorial / web / *. Class', 'prefix' input 'web-inf / class' -> 'ok'. Together with basic WAR configuration document, we have to choose 'fiboweb.war', right click on 'add file', select '/Tutorial/Src/web-inf/web.xml', and 'prefix' input 'web-inf'. Add another basic configuration document, select 'Fiboweb.war', right click on 'add file' to choose 'Porject File' select '/Tutorial/Src/web-inf/jboss-web.xml'. Plus EJB client JAR, choose 'Fiboweb.war', click on 'add file', select '/Tutorial/fiboejb-client.jar', although there is no 'fiboejb-client.jar' file, but can still add settings, And 'prefix' is to fill in 'Web-INF / LIB' -> 'OK'. Then the HTML file, select 'FIBOWEB.WAR', right to select 'add folder' selection '/ tutorial / doch', this is The content of the web app. The WAR package has been completed: to the EAR setting, the same, right pick the 'add archive', enter 'fiboApp.ear' and press 'OK'. Choose 'FIBOAPPP.EAR' right 'Add file' input '/Tutorial/src/meta-inf/application.xml', because this file is in 'meta-inf', so 'prefix' is filled in 'Meta-Inf' Press 'OK' To add an EJB module, select 'FIBOAPP.EAR' Right to select 'Add file' to fill in '/Tutorial/fiboejb.jar'. Although this archive is now Does not exist, but we can still join, press 'OK'. To add a web module, select 'FiboApp.ear' right picking 'add file' fill in '/Tutorial/fiBoweb.war'. Although this file is now Presented, but we can still join, press 'OK'. This EAR package has been completed:
After saving the information by 'ok', you will see a new file 'packaging-build.xml' in the project, which contains a complete J2EE project package setting.
You can now run the package, right-click the item to select 'Run Packaging', the console will display the following message, and there will be more JAR in the project, a WAR and an EAR profile:
转载请注明原文地址:https://www.9cbs.com/read-21977.html