4 Replies Latest reply on Sep 6, 2002 9:11 AM by Dale Bronk

    Missing something... Why doesn't JBoss look at my applicatio

    Dale Bronk Newbie

      My company likes to use the following directory structure:

      ---------------web/*.html, *.jsp, etc.

      Please note that I also tried with WEB-INF under the app_one.war folder and this helps, but does not fix the problem.

      The reason my company does this is so they can easily give access to the front-end guys to web and below without giving access to config files. Please dont respond with there are other ways to set permissions, we know and that is not part of our question.

      If I browse to localhost/app_one I get a directory structure. If I browse to localhost/app_one/web I get my html. I want localhost/app_one to actually be served by the /web folder. Actually, what I want is to do localhost/abc_app and have it be served by /web.

      My application.xml in the META-INF folder follows:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>

      <display-name>Application ONE</display-name>
      ABC Application


      I have tried:

      Nothing seems to work. When I browse to localhost/abc_app I get a 404 not found.

      Why is JBoss not accepting my application.xml?


        • 1. Re: Missing something... Why doesn't JBoss look at my applic
          Adrian Brock Master

          application.xml is for an ear not a war

          You can put a war inside an ear



          • 2. Re: Missing something... Why doesn't JBoss look at my applic
            Dale Bronk Newbie

            So are you saying that an application.xml can not be used unless we create an ear file? I ask because we are not even creating a war file. We are deploying an exploded directory structure. We generally deploy this way because it makes it much easier for our gui guys to simply go in and edit jsp's, jpg's, etc. Other app servers I have worked with (OrionServer) had no problem specifying the actual location of the web directory in the application.xml whether or not it was exploded or in an ear file.


            • 3. Re: Missing something... Why doesn't JBoss look at my applic
              Adrian Brock Master

              I never said file, you can have an exploded ear
              containing an exploded war. I was pointing out that
              application.xml belongs in the META-INF of the ear not
              the war.
              Put it in the wrong place and jboss will ignore it.


              • 4. Re: Missing something... Why doesn't JBoss look at my applic
                Dale Bronk Newbie

                Thank you... My misunderstanding. I did this and it worked, but not completely what I wanted.

                My structure
                ............web/*.html, *.jsp, etc.

                My application.xml:


                This setup works as long as I have html/jsp/etc. in my app_one.war folder. But I don't. I have my html/jsp/etc. in my app_one.war/web folder. I tried moving the WEB-INF under the app_one.war/web folder and changing my <web-uri> to app_one.war/web but that causes 404 not founds. Is this just not possible with JBoss? Other appservers have a server.xml that would allow me to specify this, but with JBoss it seems that we have to point the app to the root war folder.

                Basically what I want is to have my app_one.war folder only contain two folders: web and WEB-INF. Nothing else. When I browse to my /abc_app it should be served from the /app_one.war/web folder. It is acceptable to us to have to move the WEB-INF folder under the web folder if needed, but not wanted. I know this sounds trivial seeing that we will basically have an empty war folder so why not place the contents of the web folder in it, but that is not my call. It is the way my client wants it unless it simply can not be done.