3 Replies Latest reply on Nov 11, 2002 11:25 AM by Jamie de Wet

    How to deploy WAR

    Jamie de Wet Newbie

      Hi there, how would I deploy my WAR file. Do I copy it into the server/default/deploy directory as I do for my .EAR file or copy it elsewhere? Do I need to put my WAR file into a EAR file first or can I deploy it as a WAR file directly? Do I need to specify my jsp in my web.xml file?

      My WAR file contains a jsp file, java bean and the web.xml file. If I comment out all the java from my jsp file (so that is basically a simple html file), I can see the web page, but when I put the java code back in, I get an error saying that it can't find the java class. The java class I'm using is in the path WEB-INF/classes/test/jsp of my WAR file but my class's package name is just test/jsp.

      Your help is much appreciated
      Jamie

        • 1. Re: How to deploy WAR
          Gil Blais Newbie

          Jamie - drill down to the /server/default/deploy directory and create a folder of YourAppName.war and place your war file in it. If all is set up properly in your web.xml and such, and you have JBOSS running it will pick up the update immediately and hot deploy it while you watch.
          Gil :=))

          • 2. Re: How to deploy WAR
            Joel Vogt Master

            deploy the same as an ear file. You don't have to specify jsp in web.xml.

            How are you importing the file in your jsp? Probably post a quick code snip to help

            • 3. Re: How to deploy WAR
              Jamie de Wet Newbie

              I have posted the jsp code I'm using. Even when I deploy my .WAR file in JBoss, I can see a line saying: web.xml not found when JBoss is deploying the WAR. Any Ideas? Thanks, Jamie




              JSPWithCounter


              <jsp:useBean id="JSPWithCounterBeanId" scope="session" class="jsptest.JSPWithCounterBean" />
              <jsp:setProperty name="JSPWithCounterBeanId" property="*" />

              <h1>
              JBuilder Generated JSP 01
              </h1>

              Enter new value :




              Value of Bean property is :<jsp:getProperty name="JSPWithCounterBeanId" property="sample" />
              This page has been visited :<%= JSPWithCounterBeanId.count() %> times.