5 Replies Latest reply on Apr 29, 2004 12:12 PM by James Clover

    how to include a single jsp file

    pasche Newbie

      Hi,

      I´m trying to include a single jsp-File into JBoss, but it doesn´t work. Only complete ear-files work correct. The "jboss-service.xml":


      <attribute name="URLs">
      deploy/, deploy/test1.ear, deploy/test2.jsp
      </attribute>



      if I connect via a web browser to "http://localhost:8080/test1" it works correct.
      "http://localhost:8080/test2" doesn´t work. can anyone help me ?

        • 1. Re: how to include a single jsp file
          Darran Lofthouse Master

          Sounds like you have done some research and missed a lot of important information.

          I would reccomend following through the getting started guide, that should make things a lot clearer for you.

          Why are you editing a jboss-service.xml file to deploy components?

          • 2. Re: how to include a single jsp file
            pasche Newbie

            I got it from different websites: "If you want to add a application, you have to add it to the jboss-service.xml"

            Where do I find the getting started guide ?

            And please tell me how I add a single jsp site to Jboss because that is the only problem I have.

            • 3. Re: how to include a single jsp file
              Darran Lofthouse Master

              Sounds like the different websites are out of date.

              To deploy an application put the archive file (jar,war,ear etc...) in the server/default/deploy folder (Assuming that you start JBoss with the run script with no arguments) JBoss will then deploy it automatically.

              If you look at the Docs link above the getting started guide is available for free from there.

              To deploy a JSP page it needs to be packaged in a war. The war can either be an archive or it can be deployed as a directory.

              • 4. Re: how to include a single jsp file
                pasche Newbie

                The link to the getting started guide dosn´t work :-(

                Perhaps you can help me. I´m doing this for a school project. I got a directory with a web application. it includes an "index.html" which loads the "main.jsp".

                Now I want this application to be developed in Jboss. But I have no idea how to do this :-)

                Can you help me how I have to cnofigure jboss that I can load the "index.html" in a normal webbrowser ?

                • 5. Re: how to include a single jsp file
                  James Clover Newbie

                  Pasche,

                  As Darran mentioned, the first thing you have to do is build a WAR file. A WAR file (a file ending with .war) is just a zip file that has a specified structure so that the J2EE container (JBoss) can understand an expose your web applications (your JSPs, Servlets, and HTML files).

                  Check out http://cermics.enpc.fr/doc/java/j2eetutorial-1.4/doc/WebApp3.html - it might help you understand what a WAR file is. You should really check out a book on JSPs and Web Applications to understand this better.

                  Once you have a WAR file, just drop it in the