| <html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 2. Installing and Running GreenPages</title><meta content="DocBook XSL Stylesheets V1.76.0" name="generator"><link rel="home" href="index.html" title="A Guide to the GreenPages Sample"><link rel="up" href="index.html" title="A Guide to the GreenPages Sample"><link rel="prev" href="ch01s04.html" title="Installing Apache Maven"><link rel="next" href="ch02s02.html" title="Obtaining GreenPages"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><td align="left" width="20%"><a accesskey="p" href="ch01s04.html">Prev</a> </td><th align="center" width="60%"> </th><td align="right" width="20%"> <a accesskey="n" href="ch02s02.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 2. Installing and Running GreenPages"><div class="titlepage"><div><div><h2 class="title"><a name="installing.greenpages"></a>Chapter 2. Installing and Running GreenPages</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ch02.html#installing.greenpages.introduction">Introduction</a></span></dt><dt><span class="section"><a href="ch02s02.html">Obtaining GreenPages</a></span></dt><dt><span class="section"><a href="ch02s03.html">Building and Installing GreenPages</a></span></dt><dd><dl><dt><span class="section"><a href="ch02s03.html#installing.greenpages.building.mvn">Building with Apache Maven</a></span></dt><dt><span class="section"><a href="ch02s03.html#installing.greenpages.building.par.provided">Installing Dependencies into Virgo Tomcat Server</a></span></dt><dt><span class="section"><a href="ch02s03.html#installing.greenpages.building.db">Starting and Configuring the Database</a></span></dt><dt><span class="section"><a href="ch02s03.html#installing.greenpages.building.par">Installing and Starting GreenPages PAR</a></span></dt></dl></dd><dt><span class="section"><a href="ch02s04.html">Browsing the GreenPages Application</a></span></dt><dt><span class="section"><a href="ch02s05.html">Running GreenPages from Eclipse</a></span></dt><dd><dl><dt><span class="section"><a href="ch02s05.html#installing.greenpages.tools.importing">Importing the GreenPages Projects into Eclipse</a></span></dt><dt><span class="section"><a href="ch02s05.html#installing.greenpages.tools.configuring">Configuring Virgo Tomcat Server Target Runtime</a></span></dt><dt><span class="section"><a href="ch02s05.html#installing.greenpages.tools.run">Running GreenPages from Within Eclipse</a></span></dt></dl></dd></dl></div><div class="section" title="Introduction"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="installing.greenpages.introduction"></a>Introduction</h2></div></div></div><p>GreenPages is a simple application that allows users to search an online email address directory. Each listing | |
| in the directory details the relevant email addresses and the name of the owner. GreenPages has only three screens: | |
| the search screen, the results screen and the listing detail screen.</p><p>In the search screen, users can enter search criteria to be matched against the listings in the directory. | |
| The result screen displays any listings that match the criteria entered by the user. The listing detail screen | |
| shows all the data known about a given listing.</p><p>Despite its simplicity, GreenPages is designed to demonstrate many different Virgo Tomcat Server features and to | |
| act as a template from which other modular applications can be built. In particular, GreenPages demonstrates: | |
| </p><div class="itemizedlist"><ul class="itemizedlist" type="bullet"><li class="listitem" style="list-style-type: disc"><p>bundle dependencies with <code class="literal">Import-Package</code>,</p></li><li class="listitem" style="list-style-type: disc"><p>load-time weaving with JPA and AspectJ,</p></li><li class="listitem" style="list-style-type: disc"><p>bundle classpath scanning, and</p></li><li class="listitem" style="list-style-type: disc"><p>service export, lookup and injection.</p></li></ul></div><p>In addition to demonstrating common Virgo Tomcat Server features, GreenPages demonstrates integration with: | |
| </p><div class="itemizedlist"><ul class="itemizedlist" type="bullet"><li class="listitem" style="list-style-type: disc"><p>Spring Framework 3.0;</p></li><li class="listitem" style="list-style-type: disc"><p>FreeMarker 2.3;</p></li><li class="listitem" style="list-style-type: disc"><p>EclipseLink 1.0.0;</p></li><li class="listitem" style="list-style-type: disc"><p>H2 1.0.71; and</p></li><li class="listitem" style="list-style-type: disc"><p>Commons DBCP 1.2.2.</p></li></ul></div><p> | |
| </p><p>The GreenPages application is packaged as a PAR file containing four bundles. | |
| </p><div class="mediaobject" align="center"><table cellpadding="0" cellspacing="0" summary="manufactured viewport for HTML img" border="0" width="461"><tr><td align="center"><img src="images/installing-greenpages/greenpages.png" align="middle" width="461"></td></tr></table></div><p> | |
| </p><p> | |
| The <code class="literal">greenpages.db</code> bundle provides access to an external database and publishes a | |
| <code class="literal">javax.sql.DataSource</code> service. | |
| </p><p> | |
| The <code class="literal">greenpages.app</code> bundle exports a <code class="literal">greenpages</code> package containing | |
| <code class="literal">Directory</code> and <code class="literal">Listing</code> interfaces. | |
| </p><p> | |
| The <code class="literal">greenpages.jpa</code> bundle imports the <code class="literal">greenpages</code> package and | |
| uses the <code class="literal">javax.sql.DataSource</code> service to | |
| access the external database and publishes its contents as a <code class="literal">greenpages.Directory</code> service. | |
| </p><p> | |
| The <code class="literal">greenpages.web</code> web application bundle imports the <code class="literal">greenpages</code> package and uses the | |
| <code class="literal">greenpages.Directory</code> service to respond to web requests. | |
| </p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="ch01s04.html">Prev</a> </td><td align="center" width="20%"> </td><td align="right" width="40%"> <a accesskey="n" href="ch02s02.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%"> </td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%"> </td></tr></table></div></body></html> |