In this lesson, you will create a web page in the form
of a Faces JSP file. In the next lesson, you will add data to this
page using the data parts and functions you created in the previous
lesson. When the page is finished, it will show a list of every record
in the database.
This tutorial uses JavaServer Faces (JSF) technology. JSF
offers a framework for developing user interfaces for web applications.
The web pages in JSF are JavaServer pages (JSPs). JSPs contain JavaServer
controls that you can use to embed Java code into the page, providing
dynamic content.
Preview the web page on the server
No data from the database is on the web page yet, but you
can run the JSP file on the web application server and see how the
page looks so far. This is an important step; it ensures you have
the application server working properly before the page becomes complicated.
- Make sure your application server is started. The server
name should be visible in the Servers view
(located by default under the Editor view). The server should show
the words Started and Synchronized in
brackets after the name. If not, right-click the server name and click Start.
The start process might take a few minutes.
- In the Enterprise Explorer view, expand the EGLWeb/WebContent folder
if necessary. Right-click the allcustomers.jsp file
and click . The Define a
new server window opens.
- In the Define a New Server window,
select your server.
- Select the Always use this server when running
this project check box.
- Click Finish.
The web page opens in a web browser inside the workbench.
The page looks like this:
If you
see an HTTP 404 error message (page not found), restart the server
and refresh the browser window.
If you prefer to use an external
web browser, you can copy the URL from the web browser inside the
workbench and paste that URL into the external browser's address field.
Eclipse
may again display the JSF Trace view. You can permanently remove the
view by scrolling down until you find a link that says
Do
not open it again and clicking that link.
This page does
not have any data on it yet. In the next lesson, you will add data
to this page using EGL.