2 Replies Latest reply on Dec 14, 2004 1:56 PM by Loopy

    Creating Servlets For JBoss Deployment (Retrying)

    Loopy Newbie

      I'm reposting this again because something weird happened with the previous attempt at posting.

      Basically, I want to create a servlet and deploy it on my JBoss Server which I run on the same machine as I develop (as a test server).

      I create a J2EE1.4 Project
      I setup the build path so that /src has all the source files and /bin has all the class files
      I create an HTTP Servlet via the New=>Class menu.
      Sometimes, I get a black screen, sometimes, I get the skeleton servlet code, which is find. It compiles automatically, which is also fine. However, when I attempt to deploy, it will fail, saying something about unable to open a zip file. Fair enough, the program is not a WAR/EAR/SAR file. I try to run XDoclet and Packaging and nothing happens. If I try to deploy again, the same thing happens.

      Can anyone tell me what blindingly obvious thing I am missing?

      Loopy

        • 1. Re: Creating Servlets For JBoss Deployment (Retrying)
          Marshall Marshall Expert

          Loopy -- Sorry about your previous posting bug. We're having some issues in our forums that we're trying to get ironed out.

          To answer your question:
          Have you setup the packaging configuration of your project? Running packaging on it will do nothing if you haven't setup a package for it to bundle. Go into the project's properties (right click on the project, click on properties), and click on Packaging Configurations.

          Here you will have to setup your WAR file (your classes should be going into WEB-INF/classes, libraries WEB-INF/lib, etc..) If you need more help setting up a WAR archive you might need to search google as there are plenty of resource out there describing that process.

          Hopefully that helps =)

          • 2. Re: Creating Servlets For JBoss Deployment (Retrying)
            Loopy Newbie

            Hi. Thanks for the reply. Firstly about the forum. I just tried to reply to this post before logging in, and got this:

            Cannot invoke the operation : the module threw an exception
            


            However, after logging in, and then hitting reply, it was fine.

            Second, about the problem. I don't know why, but if I close the Java Perspective and then reopen it, I've now got the Doclet and Packaging entries in my project. So, problem solved!

            Thanks for the info on WAR files though, I'll go take a rummage now. :)