1 Reply Latest reply on Jan 8, 2002 6:20 PM by John Worley

    JBoss 2.4.4 Context for WAR file

    John Worley Newbie

      I have a Webapplication that uses the JBoss JDBC connection pool. It doesn't have any EJBs. The clients are handled by JSP and Servlets so I have built a .war file with my application. I can place it in the JBoss deploy directory and start JBoss up using the run_with_catalina script. Everything comes up fine and my application gets deployed.

      My problem is that I have to access my application using "http:/localhost:8080/<war file name>".
      I would like to use a different name than the .war file the way the "tomcat-test.ear" demo uses the name "http:/localhost:8080/jboss" to run. "jboss" is defined in the "application.xml" file in the .ear file. I don't want to create a .ear file for my application if I don't need to. The "server.xml" file under <Catalina home>/conf is not used when running from JBoss right? Do I have to use a .ear file in order to set the context for my webapp?

        • 1. Re: JBoss 2.4.4 Context for WAR file
          John Worley Newbie

          Update -
          I discoverd a link from someone on the forum with a similar question.
          I found out that JBoss 2.4.4 has the ability to automatically deploy an unpackaged .ear file.
          I tried this and it works. It doesn't completely answer my question since it requires me to unpackage my .war file instead of just dropping the .war file into the JBoss deploy directory.
          In case anyone wants to know...
          Create a new directory in the JBoss deploy directory and name it "<some name>.ear". Under this new directory create a directory called "META-INF". This directory is for placing your "application.xml" file.
          Also under the "<some name>.ear" directory you create a directory with the same name as your .war file. Next unpackage your .war file into that new directory that has the same name. The last step is to register with the JBoss auto-deploy mechanism the .ear directory that you just created. This is done in the "jboss.jcml" file in the section called Auto Deployment. The edited section will look something like-


          J2EE:service=J2eeDeployer;
          JCA:service=RARDeployer

          ../deploy,../deploy/lib,../deploy/<some name>.ear


          When you start up JBoss it should autodeploy the webapplication and you can access it using the name defined in the "application.xml" file.