Download the JBoss Consolidated Tomcat package from the JBoss home page http://www.jboss.org and download the decompression installation.
Download ant from the Ant home page to publish the Java EE (. ear) or Web program (. War) or Java package (. jar)
2. Setting Environment variables
& #8226; Java_home = <jdk1.3.x or higher installation path >
& #8226; jboss_dist = <jboss Installation path >
& #8226; Catalina_home =%jboss_dist%/catalina
& #8226; Ant_home = <ant Installation path >
Settings in Windows 2000/xp are required to be set in the Control Panel--> system--> environment variable
3. Set path to join%java_home%/bin;%ant_home%/bin to be able to perform JDK and ANT
4. Download the JBoss application example from Http://www.jboss.org/docs/manual/files/documentation-example.zip. Extract to
%jboss_dist%
|
|----Bin
|----Catalina-->tomcat 4.03
|----Client
|----Docs
|----Examples---> Application example installation directory
|----Lib
|----Server
|----All
|----Default
|----Minimal
Since these example programs have not been fully changed from the old version to support the new version, the following files need to be modified:
A.%jboss_dist%/examples/org/jboss/docs/interest/build.xml
In which you need to add the following two lines:
<property name= "Jboss.home" value= "${jboss.dist}"/>
<property name= "Deploy.home" value= "${jboss.home}/server/default/deploy"/>
In addition, it is necessary to change the "${jboss.dist}/deploy" into "${deploy.home}".
B.%jboss_dist%/examples/org/jboss/docs/interest/web.xml
In the second line, the following statement needs to be added, otherwise the Tomcat XML parser the "Web-app" element type without a declaration (the Servlet 2.3 needs to explicitly add the following statement to the Web.xml):
<! DOCTYPE Web-app Public "-//sun Microsystems, INC.//DTD Web Application 2.3//en" "Http://java.sun.com/dtd/web-app_2_3. DTD ">
C.%jboss_dist%/examples/build/build.xml
In the Validate-servlet paragraph, the original four statements need to be modified to:
<available property= "Servlet.jar" value= "${env". Jboss_dist}/tomcat/lib/servlet.jar "file=" ${env. Jboss_dist}/tomcat/lib/servlet.jar "/>
<available property= "Servlet.jar" value= "${env". Jboss_dist}/jetty/lib/javax.servlet.jar "file=" ${env. Jboss_dist}/jetty/lib/javax.servlet.jar "/>
<available property= "Servlet.jar" value= "${env". Jboss_dist}/catalina/common/lib/servlet.jar "file=" ${env. Jboss_dist}/catalina/common/lib/servlet.jar "/>
<available property= "Servlet.jar" value= "${env". Jboss_dist}/catalina/common/lib/servlet.jar "file=" ${env. Tomcat_home}/lib/servlet.jar "/>
In addition, you will need to add the following statement to the <path id= "base.path_22" > and <path id= "base.path_24" > two paragraphs to prevent problems when compiling intro-interest-client:
<pathelement location= "${jboss.dist}/client/jnet.jar"/>
<pathelement location= "${jboss.dist}/client/jboss-common-client.jar"/>
<pathelement location= "${jboss.dist}/client/log4j.jar"/>
Also, add the following statement after Intro-interest-deploy:
<!--deploy ear;
<target name= "Intro-interest-deploy-ear" depends= "Init"
<ant antfile= "Org/jboss/docs/interest/build.xml" target= "Deploy-ear"/>
</ Target>
From Windows DOS window into the Examples/build directory, execute:
(1) Ant Intro-interest-ear
A series of information appears, and finally "build succesfully"
To the Examples/build-example/interest directory and found the newly established interest.ear
(2) Ant Intro-interest-deploy-ear
A series of information appears, and finally "build succesfully"
At the same time, you will see the relevant deployment information in the started JBoss window until the deployment is successful. Of course, you can also copy the interest.ear directly to the%jboss_dist%/server/default/deploy directory, and in the JBoss control window you will see a series of information that JBoss automatically deploys interest.ear.
With http://localhost:8080/interest/access, a form appears, and the normal results are displayed when submitted.
(3) Ant intro-interest-client
A series of information appears, taking note of the following information:
[Java] Got context
[Java] Got Reference
[Java] Interest on 1000 units in 10% per period, compounded over 2 periods is:
[Java] 210.00000000000023
The last is "build succesfully", and in the JBoss control window you will see a line of statements showing:
[Interest] Someone called ' calculatecompoundinterest! '
At this point, as the Java EE Application Server Jboss+tomcat installation completed.