Book Image

GateIn Cookbook

By : Ken Finnigan, Luca Stancapiano, Piergiorgio Lucidi
Book Image

GateIn Cookbook

By: Ken Finnigan, Luca Stancapiano, Piergiorgio Lucidi

Overview of this book

<p>Enterprises have websites constructed in different web frameworks and the need for them to work together cohesively. GateIn will provide the solution to effectively integrate them into a single website. GateIn is an open source website framework that does more than a web framework by letting you use your preferred one.<br /><br />This GateIn Cookbook provides solutions whether you're planning to develop a new GateIn portal, migrate a portal, or only need to answer a specific query. It is filled with bite-sized recipes for quick and easy problem resolution. From the beginning to the end it will guide you through the process of configuring and securing a portal, managing content and resources, and developing applications as you go.<br /><br />Beginning with installation and configuration, the book swiftly moves on to discussing content, users, and security. The second half covers all aspects of developing on a portal, such as portlets, gadgets, migration, and integration.<br /><br />The goal of the book is to show GateIn as an open source website framework piece by piece. Starting with simple recipes, you will see each step analyzed with code examples and images, before progressing to more advanced recipes.<br /><br />This GateIn Cookbook will help you with a quick approach to building portals.</p>
Table of Contents (19 chapters)
GateIn Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Installing GateIn from a binary package


GateIn is released through different bundles that differ for the included application server. These bundles are dedicated to the following application servers—JBoss AS 5.x, JBoss AS 6.x, JBoss AS 7.x, Tomcat 6.x, Tomcat 7.x, and Jetty 6.x.

In this recipe, we will see which are the required packages you need to download before starting a GateIn instance.

Getting ready

A pre-requisite for running GateIn is the availability of the Java Development Kit (JDK), which must be updated to the latest revision of version 1.6. Depending on your operating system, please be sure to correctly add the JDK binaries' path to the classpath of your machine. In order to verify the Java version actually installed on your machine, you can run the following command line:

java –version

It will return an output similar to the following:

java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-10M3527)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)

If you don't find in the output the string Server VM, but you find the string Client VM in the place of Server VM, this means that the JDK is not installed on your machine. In this case, you can download the JDK 1.6 for your operating system at http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u31-download-1501634.html.

How to do it...

  1. As introduced before, GateIn can be installed using different packages, so now you can download your preferred bundle depending on which application server you need to use for your installation.

  2. Typically, the right application server can be chosen by thinking about what you need for your software architecture. Let's assume that you need to deploy GateIn together with other standard Java EE applications that need explicit support for middleware components such as DataSource, Enterprise Java Bean (EJB), Java Message Service (JMS), or an Enterprise Service Bus (ESB). You would then probably want to use the JBoss AS bundle. JBoss AS is completely focused on middleware support having the availability of a total J2EE-compliant application server. Otherwise, if you only need to use a standard servlet container, you can choose to download the Tomcat bundle.

  3. Once you have chosen the right bundle for yourself, you are ready to download it from http://www.jboss.org/gatein/downloads .

  4. After downloading the GateIn package, you can extract it in your preferred directory in your file system.

How it works

You have just installed GateIn from binary package.

There's more...

The difference between the various bundles is related to application server-specific configuration files and directories, with some added artifacts. For example, the JBoss 6.x directory structure consists of the following folders:

  • bin

  • client

  • common

  • docs

  • lib

  • server

The Tomcat 6.x bundle is based on a different structure:

  • bin

  • conf

  • gatein

  • lib

  • logs

  • temp

  • webapps

  • work

The Tomcat bundle also has a further execution script compared to the JBoss bundle, but we will see how to run a GateIn instance for all the different application servers later in the chapter, in another recipe.

See also

  • The Building and installing GateIn from the source code recipe

  • The Running GateIn on your machine recipe