12 Replies Latest reply on Oct 4, 2002 9:10 AM by nusa

    "Quick start guide" feedback

    Andrea Aime Newbie

      I'm reading the "Quick start guide" for JBoss 3.0
      and I'm finding it very useful. Anyway, I've found
      some errors and I would like to provide feedback
      to the authors. Who should I contact?
      Best regards
      Andrea Aime

        • 2. Re: "Quick start guide" feedback
          Michael Dockery Newbie

          How do you serve up a simple html page in jboss?

          The example only shows an application.
          I would like to know how to get the simple web server going.

          Is there a document root? (where a user could pull up index.html)

          Is jetty automatically started when you run run.bat?

          Thank you

          • 3. Re: "Quick start guide" feedback
            Matt Borland Newbie

            It would seem Jetty is started automatically. I know you can just deploy .war files (with html) into the server//deploy directory, but I don't know whether you can just insert files directly in there.

            By the way, I really enjoyed how dropping the .war file in automagically caused the system to identify and load it.

            • 4. Re: "Quick start guide" feedback
              Christoph Grimm Newbie

              how do get a docroot directory in jboss ( like htdocs in apache)

              what we need to know:

              a) in the deploy directory ( e.g. server/default/deploy you can have subdirectories which will be treated the same way as deploy files if their name has the same extension.

              e.g directory docroot.ear wil be treated the same way as a jar file named docroot.ear.

              b) to deploy a root-context "/" you need to embed a .war file in an .ear file and give it the root context via the application.xml deployment descriptor

              sounds pretty dificult but just follow these steps:

              1. create subdirectory named "docroot.ear" in the jboss deploy directory

              2. create a subdirectory "META-INF" in directory "docroot.ear"

              3. in this subdirectory "META-INF" create a file "application.xml" with the following content:

              <?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>docroot</display-name>
              document root


              <web-uri>docroot.war</web-uri>
              <context-root>/</context-root>




              4. create a subdirectory "docroot.war" in directory "docroot.ear"

              5. in this subdirectory "docroot.war" create an other subdirectory named "WEB-INF"

              6. in subdirectory "WEB-INF" create a file named "web.xml" with the following content:

              <?xml version="1.0" encoding="UTF-8"?>


              <web-app>
              <welcome-file-list>
              <welcome-file>
              index.html
              </welcome-file>
              <welcome-file>
              index.htm
              </welcome-file>
              </welcome-file-list>
              </web-app>

              7. start you jboss-server

              the document root directory is now /deploy/docroot.ear/docroot.war ( not docroot.ear itself !!!)

              you do not need to restart jboss, to add new files

              i'll attach a zip file named docroot.zip which contains all this stuff. if attach doesn't work, feel free to send me an email.

              • 5. Re: "Quick start guide" feedback
                Andreas Schaefer Apprentice

                Checkout the template project. Its build.xml file does this already for you.

                BTW you can also define a "document-root" in the JBoss specific web deployment descriptor: "jboss-web.xml". So you can avoid to create an EAR file for plain web-application.

                Have fun - Andy

                • 6. Re: "Quick start guide" feedback
                  Andreas Schaefer Apprentice

                  Hi

                  If everyone who said to give me feedback to the Quick Start Guide had to pay me $1 I could phone for the rest of my life.

                  Please don't hesitate to send me your feedback but be a little be patient and persistent with me (I also have a day job). So if I forgot to react on your email just resent it.

                  Andy

                  • 7. Re: "Quick start guide" feedback
                    asael Newbie

                    ok thats quite good, but how I can 'deploy' html files to have the docroot on / as I can have on tomcat itself with a ROOT directory....

                    • 8. Re: "Quick start guide" feedback
                      asael Newbie

                      ok thats quite good, but how I can 'deploy' html files to have the docroot on / as I can have on tomcat itself with a ROOT directory....

                      • 9. Re: "Quick start guide" feedback
                        Andreas Schaefer Apprentice

                        That is currently not possible (at least not with Jetty, tested on JBoss 4.0-Alpha CVS Head).

                        I guess you have to create a directory, add your stuff in there, create a "WEB-INF" directory and add a "jboss-web.xml" deployement descriptor.

                        Have fun - Andy

                        • 10. Re: "Quick start guide" feedback
                          Ottawa JBOSS Newbie

                          I still got the following error after I put the index.html
                          file into : server\default\deploy\docroot.ear\docroot.war\index.htm

                          http://localhost:8080/index.html

                          Apache Tomcat/4.0.3 - HTTP Status 404 - /index.htm

                          --------------------------------------------------------------------------------

                          type Status report

                          message /index.htm

                          description The requested resource (/index.htm) is not available.

                          --------------------------------------------------------------------------------

                          • 11. Re: "Quick start guide" feedback
                            Quande Ren Newbie

                            I created a directory XXX.war in /server/default/deploy. Now I can use http://localhost:8080/XXX/ to access it.

                            But now I want to have this directory to be outside jboss. How should I do it? I changed the config file for tomcat in /server/default/deploy but it does not work.

                            Anybody knows how to config it? Or this is a ToDo for JBoss?

                            • 12. Re: "Quick start guide" feedback
                              nusa Novice

                              If you want your directory outside JBoss, i.e. C:\any_dir\XXX.war, you need to modify your jboss-service.xml, from :

                              ./deploy

                              into

                              ./deploy,
                              C:\any_dir