7 Replies Latest reply on Jun 24, 2002 4:24 PM by Robert S. Sfeir

    Webroot Anyone?

    Robert S. Sfeir Newbie

      Ok since this is Newbie corner I can ask newbie questions right? I come from the Orion app server world where I can find a webroot to put my code in. So far I've figured out that if I have a war file I can drop it in deploy and voila instant site (very nice of course), the issue is though that I can't find where the webroot is so I can plop my JSP in during coding time. I'm sure I don't have to build a war and deploy every time I make a font change... right?

      Thanks
      R

        • 1. Re: Webroot Anyone?
          Joel Vogt Master

          I'm assuming that you are dropping the war file in jboss/deploy. This is good for deploying your class files, but a bit cumbersome for making little jsp changes.

          If you want to do the change jsp - refresh browser type of thing, try putting the war file in

          jboss/tomcat/webapps or jboss/jetty/webapps

          and restarting jboss. This will extract and depoloy the war file in this directory.

          So say if you put foo.war in tomcat/webapps, you will get tomcat/webapps/foo, tomcat/webapps/foo/WEB-INF etc...

          The war file won't hot deploy from this directory though, so if you change it's structure/classes etc you will have to restart the server again.

          Hope this helps

          • 2. Re: Webroot Anyone?
            Robert S. Sfeir Newbie

            Thanks Joe, that takes me a step closer. I'm using JBoss 3.0 with Jetty Embedded and for some reason there is no jetty directory anywhere in here. I am going to create it and see if I can deploy my war file there and see what happens.

            Essentially I want to build the web app from scratch, with having control over setting up the whole app, including the web.xml, jetty.xml (or is it jboss in this case?) etc...

            It's a bit different than what I am used to, and perhaps the archive I got and untared is not setup right in the first place???

            R

            • 3. Re: Webroot Anyone?
              Robert S. Sfeir Newbie

              As I thought that didn't work. I even created jboss/jetty/webapps/lawton manually and put my files in there including the WEB-INF directory and the web.xml but nothing I get a 404 error.

              My current JBoss root has the following directories in it:

              bin client docs jetty lib server

              (I created the jetty directory)

              then server has:

              all default minimal

              then default has

              conf db deploy lib log tmp

              The deploy directory is where I drop my war file and it autodeploys everthing.

              What I obviously want to do is set things up so I can do coding and testing before I create my war file for final deployment. I also want to run JBoss in debug mode so I can do remote debugging with IDEA... but that's another story.

              R

              • 4. Re: Webroot Anyone?
                Joel Vogt Master

                Mok, My previous answer will apply to JBOSS 2.4.x only.
                I am no expert on jboss 3, but I understand that jetty is included as a .sar file which is deployed differently. As such I don't know if you can get into the deployed war files in the same way.
                You might try looking at the configuration of
                jetty-plugin.sar/META-INF/jboss-service.xml. In particular the section

                <!-- ================================================================== -->
                <!-- If true, .war files are unpacked to a temporary directory. This -->
                <!-- is useful with JSPs. -->
                <!-- ================================================================== -->
                true

                (From JBoss.3.0QuickStart.pdf)

                Apart from that, I could only suggest trying jboss2.4.6 with jetty in which case you would be able to do as I suggested earlier.

                Anyone else know how to do this in jboss 3.0?

                • 5. Re: Webroot Anyone?
                  Robert S. Sfeir Newbie

                  Hum. Maybe this is not such a newbie question after all. I am going to venture and post this to the 'not newbie' group... probably general discussion and see what happens. Hopefuly I don't get killed.

                  • 6. Re: Webroot Anyone?
                    Greg Turner Apprentice

                    Get the quick start guide from here and this will give you info on deploying in JBoss:
                    http://prdownloads.sourceforge.net/jboss/?sort_by=date&sort=desc

                    For J2EE specific questions, get a good book on J2EE. Some of your questions indicate that you need to study up on J2EE issues.

                    • 7. Re: Webroot Anyone?
                      Robert S. Sfeir Newbie

                      Thanks but someone in the general conversation already answered it for me. Sorry nothing to do with J2EE in this case, just very weird directory and deployment setup.

                      The answer is that all you have to do is create a directory called myapp.war in the deploy directory under server/default, then you can move all your JSP/Servlet code in there, or HTML for that matter, and it will auto deploy them. Of course you're required to have a WEB-INF and web.xml since this is how things are supposed to be setup.

                      I will look at your link of sourceforge though, sounds promissing.

                      R