Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Deploying Web Applications in JBoss

 
Virendra Rahatpuri
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How do you deploy a web application in jboss-3.0.4_tomcat-4.0.6. Do you just copy the war file in the JBOSS_HOME/server/default/deploy directory or do you have to deploy web apps in the tomcat webapps directory??
Thanks
Virendra
 
Jim Zhao
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, I have the same question. Please any experts give any guide.
 
Darryl A. J. Staflund
Ranch Hand
Posts: 314
2
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're running JBoss itself, deploy the WAR to the JBoss deploy directory. If you're running the Tomcat/Jetty instance included with JBoss, deploy to the Tomcat/Jetty deploy directory.
To try it out, download Struts from http://jakarta.apache.org/struts/ and deploy struts-example.war in either. They should load once they are processed by the server you're running (JBoss or Tomcat/Jetty).
If you're web-app makes use of JAAS or references a security domain, however, you'll have to include a jboss-web.xml deployment descriptor in your WAR file. The DTD for this document can be found in <jboss-home>/docs/dtds/jboss_web_3_0.dtd.
Darryl
 
Jeffrey Manning
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Daryl -
Thanks for your reply to the previous poster. Sorry, I need a clarification in your answer.
What do you mean "if you are just running JBoss by itself, vs. if you are running TOmcat/Jetty"? Isn't JBoss by itself by default using Jetty? I didn't think it was possible to run JBoss all by itself for web application service.
To rephrase the question, if I use the integrated JBoss3.0/Tomcat4.0, do I deploy a web-app WAR to the Tomcat directory or the JBoss deploy directory?
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeffrey Manning:
Daryl -
...To rephrase the question, if I use the integrated JBoss3.0/Tomcat4.0, do I deploy a web-app WAR to the Tomcat directory or the JBoss deploy directory?

No. you deploy the WAR file into the JBOSS deploy directoy...
 
Jeffrey Manning
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the reply Andres --
but can you comment on the apparent contradiction?
according to Daryl:
"If you're running the Tomcat/Jetty instance included with JBoss, deploy to the Tomcat/Jetty deploy directory."
This seems to directly contradict the suggestion to deploy to the $JBoss_server/deploy directory.
jeffrey
 
Darryl A. J. Staflund
Ranch Hand
Posts: 314
2
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeff,
Even though Jetty and Tomcat is bundled in some JBoss distributions, you can still run them independently without starting up JBoss. You do this by executing the start-up scripts in their respective /bin directories.
For instance, if you have a JBoss / Tomcat bundle structured as follows:

You can run your web app without starting JBoss by:
1. Running /jboss/tomcat/bin/<startup_app>
2. Deploying WAR to /jboss/tomcat/deploy
In this way, the WAR file is served up by Tomcat and not JBoss. Applications deployed to the JBoss deploy directory wouldn't work in this case.
Darryl
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic