Building Apache Geronimo applications using JavaServer Faces, part 1th

Source: Internet
Author: User
Tags empty tomcat

Build basic applications with Eclipse and Apache myfaces Core

Before you start

This tutorial introduces Java programmers to the use of JSF components to build highly interactive Java EE applications that are deployed on Apache Geronimo. This tutorial assumes that the reader uses the Eclipse integrated development Environment (IDE) as the development platform.

About this tutorial

This tutorial describes Apache Geronimo, which is a pure Java EE application Server. It also describes the JSF programming environment that uses the Eclipse IDE and the Apache myfaces, which is implemented by an open source JSF framework. Here you will develop a developer forum to register the front end of the page and learn how to use common input methods and data validation techniques.

About this series

This is a tutorial on using JSF to build the Apache Geronimo application, which is part of the 1th part of the tutorial, which is divided into five parts. The following sections are included in a later series of tutorials:

Part 2nd: Using Tomahawk in JavaServer Faces shows how to integrate Apache Tomahawk in a Geronimo application. Tomahawk offers several custom components that are compatible with JSF 100%.

Part 3rd: Using AJAX4JSF in JavaServer Faces demonstrates how to use the Sun's AJAX4JSF tool to make the Geronimo application compatible with Ajax.

Part 4: Using the ADF Faces extension JSF teaches you how to integrate components from the ADF Faces into the Geronimo application. Oracle's ADF Faces is a very rich set of UI components built on top of JSE.

Part 5th: Integrating JSF applications with spring integration shows how to integrate JSF applications with the spring framework. Spring is a popular framework that makes it easier for Geronimo developers to build Java EE applications.

System Requirements

To learn this tutorial, you need some of the following tools:

Geronimo, Apache Java EE Server project. As needed, Geronimo offers Tomcat and Jetty two styles. We're using the Jetty style (version 1.1) because it's a little bit smaller.

Myfaces, the JSF implementation of Apache. Please download the kernel version (without Tomcat) from Apache. The version we use in this tutorial is the 1.1.3 version.

An empty myfaces Web application. Please download Marty Hall's Jsf-blank-myfaces-minimal.zip archive from the coreservelets.com Web site. The archive includes an empty WEB application that contains the smallest myfaces library necessary for a basic myfaces application and can be transferred to Geronimo almost intact. Yes, two downloads of these. jar files (once here, once in the Myfaces kernel archive) because you still need to get the documentation from the Myfaces archive and other optional jar files that you might be interested in.

Eclipse, an extensible open source integrated development environment (IDE) that can support a large number of languages and platforms.

The Eclipse Web Tools Platform (WTP), which adds support for XML to eclipse and basic support for JSF.

Install Java 1.4 or later in your system. The Eclipse binaries have its own Java runtime, but Geronimo and myfaces do not (with the runtime, the size of the downloaded archive is dramatically larger). In this tutorial, we use Java 1.5 for Mac OS X 10.4, but the platform should not be a problem. You can obtain Java technology files from Sun Microsystems or IBM®.

Overview

Java Servlet and JavaServer Pages (JSP) technologies provide a powerful environment when creating WEB applications, but there is no standard way to create a user interface (UI). You must manage the status of all forms on your JSP pages on your own, and you must also forward incoming HTTP requests to the appropriate event handlers. If the site's GUI is complex, the complex infrastructure that comes with the application becomes unmanageable. In addition, the site will have some specific behavior and other details, making the code you build difficult to reuse. JSF provides a ready-made tool for simplifying high-level tasks, such as the arrangement and reuse of UI components, and associates the status of components with input processing with objects that determine application behavior.

Apache Geronimo

Apache Geronimo is an open source (Apache Software Foundation License protocol) Java EE server designed to enhance application compatibility and performance as much as possible. Its current version (up to 1.1 when it was written) passed the Technology compatibility Kit (TCK) test of Sun's Java 2 Platform, Enterprise Edition, which means it matches the sun Specifications, fully compatible with the Java EE server.

When packaged with a Jetty or Tomcat Web server, Geronimo is very easy to enable and run, and it has deployed an extremely useful management interface application. You do not need to reboot or reconfigure the server in any way to upload and start the Web application.

Myfaces

Myfaces is the first free and open source JSF WEB application Framework implementation. JSF is similar to the popular Struts framework, which implements the model-view-controller (MVC) pattern, but it has some features that Struts did not provide. JSF is defined by the Java specification Request #127 (JSR 127) specification, which is approved by experts in the WEB application industry as the specification of the Java Community Process (JCP).

Eclipse

Eclipse is built on an extensible, plug-in-based architecture that is an open source integrated development environment (IDE). In this way, only one IDE can support almost any language, task, platform, and data file needed to do any work. This will benefit from Java's plug-in for the development of outstanding support and WTP projects. WTP provides an XML-enabled editor, and it also provides experimental support for myfaces.

Let's take a quick look at our application example.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.