Building Apache Geronimo applications using JavaServer Faces, part 2nd

Source: Internet
Author: User
Tags tomcat

Using Tomahawk in JavaServer Faces

This tutorial is part 2nd of the tutorial series, which is divided into 5 sections. This tutorial explains Apache Tomahawk. In the 1th phase of this series, the Java™server faces™ (JSF) was introduced and a simple JSF application was built and successfully deployed on Apache Geronimo. JSF is a new java-based framework that makes it easier to build Java Platform, Enterprise Edition (Java EE) application graphical user interface (GUI). You will now study the Apache Tomahawk, which provides several custom 100% compatible components with JSF, and learn how to integrate it into your application to improve the interface.

Before you start

This tutorial teaches Java programmers How to build highly interactive Java EE applications on Apache Geronimo using JSF components. This tutorial assumes that readers will use the Eclipse IDE as a development platform.

About this tutorial

This tutorial explains the Apache Tomahawk, which is a set of supplemental components that can improve the JSF application interface. We'll add some input validators and other input components to further develop the front-end of the Developer Forum registration page.

About this series

This tutorial is part 2nd of the five-part tutorial series on using JSF to build the Apache Geronimo application. The entire series of tutorials includes the following sections:

Part 1th: Building basic applications using Eclipse and Apache Myfaces Core describes how to use the JSF standard Apache myfaces Implementation and Geronimo (a free Application server from Apache). This tutorial explains how to use the Eclipse IDE's Web Tool Platform (WTP) to build a JSF application.

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 free open source framework ajax4jsf to get the Geronimo application asynchronous JavaScript + XML (Ajax) Function.

Part 4: Using the ADF Faces extension JSF explains 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 JSE (it is part of the code donated to Apache with the Trinidad name).

Part 5th: Incorporate JSF applications with spring integration to show 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 the following tools:

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

JSF implementation of the Myfaces,apache. Please download the core version (without Tomcat) from Apache. The version used in this tutorial is the 1.1.3 version.

Tomahawk, which provides additional components and input validators for myfaces, and is compatible with JSF 100%.

Eclipse, an extensible open source IDE that can support a large number of languages and platforms.

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

Install Java 1.4 or later in your system. The Eclipse binaries have their own Java runtime, but Geronimo and myfaces are not (with the runtime making the download archive size significantly 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 do not give a 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 assign incoming HTTP requests to the appropriate event handlers. If the site's GUI is complex, the complex infrastructure that comes with the application will eventually become 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 the ability to associate the state of a component with input processing with an object that determines the behavior of the application.

Apache Geronimo

Apache Geronimo is a Java EE server with open source (the Apache Software Foundation License agreement) designed to enhance application compatibility and performance as much as possible. Its current version (at the time of writing this article, version 1.1) passed the Technology compatibility Kit (TCK) test of Sun's Java 2 Platform, Enterprise Edition (j2ee™), which means it matches the sun Specification and is 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, and you can upload and start the Web application from the management console.

Apache myfaces

The Apache myfaces is the first free Open-source JSF WEB application Framework implementation. JSF is similar to the popular Struts framework, which implements the model-view-controller (MVC) pattern, but some of its features are not provided by struts. JSF is defined by the Java specification Request #127 (JSR 127) specification, which has been approved by experts in the WEB application industry as the Java Community Process (JCP) specification.

Apache Tomahawk

The Apache Tomahawk provides a set of additional JSF components beyond the components contained in the JSF specification, and is compatible with any implementation that conforms to JSF 1.1 (such as Myfaces) 100%.

Eclipse

Eclipse is built on an extensible, plug-in-oriented architecture that is an open source integrated development environment (IDE). So, with this IDE, you can support almost any language, task, platform, and data file that you need to do any work. In this way, developers will benefit from the excellent Java development support and Plug-ins for WTP projects. WTP provides an XML-enabled editor, and it also provides experimental myfaces support.

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.