You cannot. A stand-alone Java application cannot be deployed to JBoss As as a web application.
Or are you saying you have a plain Java project in and
IDE, but that project is really a web app, and now you want to deploy it to JBoss AS within the IDE? If so, you will have ot first create a new Dynamic Web App project, copy all of your sources to it, and then deploy that.