Home  >  Blog  >   JBoss

Creating and deploying a web application in JBoss

As a Java EE 6-compliant application server, JBoss AS 7 may be used to run a broad variety of web applications. Using Java Server Faces technology, an advancement of JSP, is one of the most frequent ways to design your application today.

Rating: 4

As you can see, the application server provides a straightforward way to configure the Web container. In order to run a web application, you need to learn how to organize its specific configuration files and which libraries are needed to render the web application.

Creating and deploying a web application in JBoss

JBoss AS 7 is a Java EE 6-compatible application server and thus, it can be used to deploy a wide range of web applications. Today, one of the most common approaches to building your application is using the Java Server Faces technology, which is an evolution of JSP technology.

Currently, JBoss AS 7 supports the JSF release 2.1 using the Mojarra implementation, although there are plans for supporting MyFaces implementation too.

If you want to build your career as a JBoss professional, then visit Mindmajix - A Global online training platform for the “JBoss Training”  Course.  This course will help you to achieve excellence in this domain.


The purpose of this example is to teach the reader how to create, configure, and deploy a Java EE 6 application on JBoss AS 7. If you want to learn the best practices for developing a Java EE 6 application on AS 7, you should check out the quick-start examples that are available along with the server distribution.

MindMajix YouTube Channel

Creating a new Dynamic Web Project

There are several options for creating a JSF project using Eclipse Enterprise. The most basic option will be creating a new Dynamic Web Project from the menu. Let’s call this project as7project and use as target runtime the JBoss AS 7 runtime, which we installed at the beginning of the book.

Jboss web project

Configuring JSF 2.1 support for a web application requires very little effort. As a matter of fact, you can do it in two single steps: first, declare in your web application configuration file (web.xml) your FacesServlet and what kind of URL patterns will be directed to it.

Frequently asked Jboss Interview Questions

Note The FacesServlet is a servlet that manages the request processing lifecycle for web applications that are utilizing JavaServer Faces to construct the user interface. Here’s the web.xml file that needs to be placed in the WEB-INF folder of your application:

Jboss web project 3

Please note that Eclipse is actually able to install these files for you by activating the Java Server Faces Facets. Right-click on your project and select Project Properties. From there, you will find under the Project Facets option a set of configuration options that can be automatically added to your project. In our case, Eclipse will exactly do the file configuration that we did manually.

Jboss web project 4

Explore Jboss Sample Resumes! Download & Edit, Get Noticed by Top Employers!
Join our newsletter

Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!

Course Schedule
JBoss TrainingMar 02 to Mar 17View Details
JBoss TrainingMar 05 to Mar 20View Details
JBoss TrainingMar 09 to Mar 24View Details
JBoss TrainingMar 12 to Mar 27View Details
Last updated: 29 Apr 2023
About Author

Ravindra Savaram is a Technical Lead at Mindmajix.com. His passion lies in writing articles on the most popular IT platforms including Machine learning, DevOps, Data Science, Artificial Intelligence, RPA, Deep Learning, and so on. You can stay up to date on all these technologies by following him on LinkedIn and Twitter.

read more