Create a Sample Application to Test JBoss Agent

Blog Post created by Patrick-Dussault Employee on Feb 16, 2018

First have installed RedHat Jboss 5.1 on RedHat 5.5 64 bit


Then, create the application. 

# su - jboss
$ pwd
$ mkdir HelloWorld
$ cd HelloWorld
$ nano -w hi.jsp
<html><head><title>JSP Test</title>
String message = "Hello, World.";
<h2><%= message%></h2>
<%= new java.util.Date() %>
$ mkdir WEB-INF
$ nano -w WEB-INF/web.xml
<display-name>Hello World</display-name>


Create its deployer :

$ nano -w

JAVA_OPTS="${JAVA_OPTS} -DJAVA_AGENT_ROOT=${SOA_HOME} -Dlog.log-config-properties=${SOA_HOME}/config/"



Create and deploy the .war

$ /opt/java/jdk/bin/jar -cvf helloworld.war *.jsp WEB-INF
$ cp helloworld.war $JBOSS_HOME/server/default/deploy
$ chmod 755 /opt/java/jboss/jboss-as/server/default/deploy/helloworld.war


Start JBoss and have fun

$ cd ..
$ ./jboss-as/bin/

NOTE : add any other jsp page in the same directory of hi.js in order to produce headers, etc.