4 Replies Latest reply on Oct 4, 2006 7:38 PM by peterj

    how does this work...

    kkarank

      hi

      i am starting my stint with jboss and had a very simple question

      if i type http://localhost:8080/fibo

      how does the server know which file to present and where is it located ? where is this file placed ? for example in tomcat there is a file called server.xml that contains the context mapping - where is the same in jboos ?

      cheers

        • 1. Re: how does this work...
          peterj

          If you have a war file named fibo.war, then your url will access that war file (and the welcome page defined in the web.xml).

          If you have a war filke named fibonacci.war, and want to use your url, then add a jboss-web.xml file to the WEB-INF directory. It should contain:

          <?xml version="1.0" encoding="UTF-8"?>
          <jboss-web>
           <context-root>/fibo</context-root>
          </jboss-web>


          Oh, and the fibonacci.war file is located in the server/default/deploy directory.

          • 2. Re: how does this work...
            kkarank

            hi Peter ,let me explain

            the application name is FiboApp.ear and it contains FiboEJB.jar and FiboWeb.war - the META-INF of FiboApp.ear contains the application.xml file where there is a mapping from /fibo to FiboWeb.war

            this means that once that server comes to this application.xml file it will know what to do next.

            but my point is if i type http://localhost:8080/fibo how does the webserver know that it needs look inside the FiboApp.ear - what happens if i have say FiboApp2.ear , FiboApp3.ear and so on in my ...server/default/all directory ?

            Thanks

            • 3. Re: how does this work...
              kkarank

              sorry i meant ...server/default/deploy directory :)

              • 4. Re: how does this work...
                peterj

                It doesn't matter what you call the ear file. The server maintains an internal list of the contexts and simply goes to the correct war. When you deploy an ear file, it takes it apart and deploys its contents, and thus updates its internal tables.