JBoss.orgCommunity Documentation

Chapter 5. Developing a simple JSP web application

5.1. Setting Up the Project
5.2. Creating JSP Page
5.2.1. Editing a JSP Page
5.2.2. web.xml file
5.2.3. Deploying the project
5.2.4. JSP Page Preview
5.2.5. Launch JSP Project

In this chapter you will find out how to create a simple JSP application using JBoss Developer Studio. The application will show a classic "Hello World!" on the page.

It will be assumed that you have already launched JBoss Developer Studio and also that the Web Development perspective is the current perspective. If not, make it active by selecting WindowOpen PerspectiveWeb Development from the menu bar or by selecting WindowOpen PerspectiveOther... from the menu bar and then selecting Web Development from the Select Perspective dialog box.

We are going to start by creating a Dynamic Web Project with a minimal structure, that is with just required facets.

The jspHello node should be visible in the upper-left Package Explorer view.

This section outlines how to create, edit and then preview a JSP page.

In our simple application we need to create only one JSP page which displays a "Hello World!" message.

In the next window you can choose a template for your JSP page and see its preview.

Our hello.jsp page will now appear in the Project Explorer view.

Writing any scripts and managing the packaging process can be quite a complicated and time consuming task for even the most trivial web applications. However, JBoss Developer Studio relieves you of this burden. All you need is to start your JBoss Server and launch your application in your favorite browser.

You can also create a JAR archive with JBoss Developer Studio's Archive Tools and export it to any web server.