Jboss EAR Deployement Servlet JSP Application

Jboss EAR Deployement Servlet JSP Application

In this demo we will create Servlet JSP application and create EAR file using Ant build file, finally deploy on JBoss server. Please follow steps below:

  • Create dynamic web project name: EarDeploymentJbossServlet
  • Final project structure:

Jboss EAR Deployement Servlet JSP Application

  • web.xml:

  • index.jsp:

  • application.xml:

  • HelloWorld.java:

  • To create EAR file to deploy on JBoss server use this build.xml file:

  • To create EAR file : Right click build.xml –> Run As –> Ant Build…

Jboss EAR Deployement Servlet JSP Application

  • This will create EAR file in “C:\JavaHonk\jboss-6.1.0.Final\server\default\deploy” folder. If your JBoss installation location is on different location then copy EAR file here and paste to JBoss_Home\\server\default\deploy folder and start JBoss server. Now open your browser and type below URL you will page as below:

Jboss EAR Deployement Servlet JSP Application

  • For test you click here link to send request to servlet and you will see response as below:

Jboss EAR Deployement Servlet JSP Application

That’s it for Jboss EAR Deployement Servlet JSP Application

For more information JBoss and EAR deployment please read this tutorial

download  Download Project: EarDeploymentJBossServer

Leave a Reply

Your email address will not be published. Required fields are marked *