Run the build.xml file to compile, package, and deploy the servlet web application to the JBoss server. Right-click the build.xml file and select Run -> Ant Build, as shown in Figure 8.
Figure 8. Running the Ant build file
Ant generates the web application .war file webapp.war and deploys it to the JBoss application server's deploy directory. The output from Ant is shown in Figure 9.
Figure 9. Output from Ant
Next, start the JBoss server with the bin/run script.
Invoke the example servlet in a web browser with the URL
JBossServlet runs in the JBoss server and the output
gets displayed in the browser, as shown in Figure 10.
JBossServlet in JBoss server