Here is a tutorial on using IntelliJ with JBoss AS: http://www.jetbrains.com/idea/training/demos/JBoss_server.html
The tutorial is fairly old but might help to get you started.
Also, do you really have to use IntelliJ? It might be better to use Eclipse + JBoss Tools, expecially since the JBoss Tolls docs have a lot of very detailed turorials on building and deploying various different Java EE apps. And there is also: https://www.packtpub.com/developers-guide-for-jboss-tools-3/book