For windows see Windows service.
Installation on Linux and Unix based systems
Downloading JBoss Web
JBoss Web is distributed as a standalone webserver. The distribution can be downloaded directly from the JBossWeb downloads page. JBoss Web is not pure Java. It contains native code, compiled and optimized for each operating operating system. Download the package appropriate for your platform, paying particular attention to whether or not you are running on the 64-bit system.
Uncompress the distribution wherever you would like JBoss Web installed.
Then download the native part from the JBossNative downloads page. And uncompress it in the JBossWeb direction (named like jboss-web-2.1.0.GA/). The files will be installed in the bin subdirectory.
On some system you may have to do an extra step. Edit/Create the $CATALINA_HOME/bin/setenv.sh (CATALINA_HOME should be something like jbossweb-1.0.0.GA) add the LD_LIBRARY_PATH variable and modify/add:
Note that since JBoss Native 2.0.4 the location of the files has changed and they are located in something like: bin/META-INF/lib/<os.name/>lt;os.arch /> For example:
bin/META-INF/lib/linux2/x64/libtcnative-1.so so the setenv.sh should be something like the following:
Runnning JBoss Web
Before starting, make sure that your JAVA_HOME environment variable is set to your Java install directory. From the bin directory, run the startup.bat or startup.sh script, as is appropriate for your platform. If you run this from a shell, you will see the JBoss Web console log scroll by. If JBoss Web started correctly, the last few lines of output should contain something like the following:
Feb 15, 2008 10:45:10 AM org.apache.coyote.http11.Http11AprProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080
Feb 15, 2008 10:45:10 AM org.apache.coyote.ajp.AjpAprProtocol start INFO: Starting Coyote AJP/1.3 on ajp-8009
Feb 15, 2008 10:45:10 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 888 ms
The last line is the message JBoss Web sends when all services are up and running, letting you know that everything is good. However, the two lines before it are important for JBoss Web. They tell you that JBoss Web is listening on two ports, 8080 and 8009. More importantly, you can see from the output that JBoss Web is using the APR(Apache portable runtime) libraries. This means that you are using the optimized native libraries. Without the APR libraries, you would see output more like the following, with no reference to the APR code.
INFO: Starting Servlet Engine: JBoss Web/18.104.22.168
Feb 15, 2008 9:31:10 AM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080
Feb 15, 2008 9:31:10 AM org.apache.coyote.ajp.AjpProtocol start INFO: Starting Coyote AJP/1.3 on ajp-8009
Feb 15, 2008 9:31:10 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 1192 ms
In worse cases, like using the wrong version of the libraries for your platform, JBoss Web may completely fail to start. If there is an error, check the console log (the output in your terminal window) or the server log in logs/catalina.out for more information about the problem.
Setting trace in the AprLifecycleListener may help to find what goes wrong. To do this add in conf/logging.properties the following: org.apache.catalina.core.AprLifecycleListener.level=FINE
To access your JBoss Web instance, go to http://localhost:8080/ in your web browser. If everything went well, you will see the JBoss Web start welcome screen. Congratulations, your JBoss Web instance is ready to go.
Deploying Web Applications
Developing web applications on JBoss Web is easy. To deploy a web application, copy the WAR file to the webapps directory. After a few seconds, JBoss Web will deploy the web application automatically. The following output shows the log messages after deploying an application named myapp.war.
Feb 15, 2008 10:56:11 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive myapp.war
The ctxPath value is /myapp, which means the application would immediately be accessible at http://localhost:8080/myapp.
Changes to the application can be made by copying a newer version of the WAR file into the deploy directory. If you need to remove an application, remove the WAR file from the deploy directory. JBoss Web will undeploy the application, noting the fact in the log.
Feb 15, 2008 10:57:31 AM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/myapp]
Feb 15, 2008 10:57:31 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive myapp.war
We've only shown the bare minimum to get you going with JBoss Web. Further Configuration of JBoss Web is discussed in the rest of the JBoss Web documentation.