Well, typically you would package a simple web application as a web application archive (.war file) and deploy it to an application server or
servlet container by copying that .war file to whatever directory the server looks in for stuff to deploy. The structure of a WAR is pretty straightforward, but very important. Google should be able to help you out there. However, you can't just package any old existing Java application as a WAR and expect (in this case) JBoss to know what to do with it. Typically a Java web application contains a deployment descriptor to help the application server / servelt container to figure that stuff out, and the application would more than likely require some modifications as well.
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.