Red Hat Application Server: JOnAS User Guide | ||
---|---|---|
Prev | Chapter 31. Integrating Tomcat and JOnAS (for JOnAS version < JOnAS 2.6) | Next |
With Ant (http://jakarta.apache.org/ant/) you can compile the Web applications that you will find under $JONAS_ROOT/examples. You have to run build install to compile examples and install the .war file in tomcat.
If you use gnu make, you just have to run:
make to compile the whole application
make install to install the .war file in Tomcat.
You can also run compilers manually via compile.sh or compile.bat.
Looking at the alarm example, the following steps are performed run rebuild all on the web application:
Run make install in the bean directory to build the alarm.jar file and install it in $JONAS_ROOT/ejbjars
Create in output/webapps an alarm directory that will be used to build the alarm.war file that will be installed in $TOMCAT_HOME/webapps ($CATALINA_HOME/webapps)
Copy $JONAS_ROOT/ejbjars/alarm.jar to output/webapps/alarm/WEB-INF/lib. This is the way servlets or JSPs will see the bean classes. Another possibility would be to make this classes accessible by the classpath.
Copy etc/web.xml to output/webapps/alarm/WEB-INF
Copy all files under the web directory in output/webapps/alarm
Make a .war file that has all the directory hierarchy under output/webapps/alarm
Install the application by copying alarm.war to $TOMCAT_HOME/webapps ($CATALINA_HOME/webapps) and copying apps-alarm.xml to $TOMCAT_HOME/conf (for Tomcat 4.0.x, apps-alarm.xml is not used).