Writing deployment descriptor
13 September 2008If you writing J2EE applications, you need to deploy your application to J2EE container like JBOSS. I will shed some light on how to write simple deployment descriptors for your web applications.
I am deploying my JSP application on JBOSS. For JBOSS, we need to put our application in WAR format in deploy folder. So deployment descriptor will have following 2 tasks:
1. Archieve the application into WAR
2. Copy that WAR to deploy folder of JBOSS
Assuming we are using default JBOSS configuration, following deployment descptor will serve our purpose:
"%JAVA_HOME%\bin\jar.exe" -cvf helloworld.war *.jsp WEB-INF copy helloworld.war "%JBossHome%\server\default\deploy"
Make sure you set JBOSS_HOME to your jboss directory. Simply save the deployment descriptor in a batch file (deploy.bat) and run it to preapre archieve and deploy on JBOSS.
I used the switch -cvf with JAR command.
c for create new achieve
v for generate verbose output on standard output
f for specify archive file name
I hope this simple post will prove useful.
Related Posts:
Top Of Page | Trackback
If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.
It will look like this: Writing deployment descriptor