Do It The jAPS Way
Copyright © 2009 AgileTec s.r.l.
Legal Notice
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the Appendix entitled "GNU Free Documentation License".
2009-06-01
| Revision History | ||
|---|---|---|
| Revision 1.3 | 2009-06-01 | RQ |
|
English and docbook adoption | ||
| Revision 1.2 | 2009-02-09 | ES |
Public release | ||
Abstract
This document describes how to install the portal example built with jAPS 2.0 (Relative to package jAPS demo). This guide is recommended for technical users who want to customize a portal.
Table of Contents
List of Examples
Table of Contents
This document describes how to install the portal example built with jAPS 2.0 (Relative to package jAPS demo). This guide is recommended for technical users who want to customize a portal. Using demo, users have the opportunity to try services and features of jAPS 2.0 platform.
This document is for developers aiming to customize a portal beginning from a portal example buitl with jAPS 2.0.
In order to take maximum advantage from the present document, it is necessary to have basic knowledge about: the Java platform, the Eclipse IDE, the Apache Tomcat servlet engine, the PosgreSQL DBMS.
To install the portal example built with jAPS 2.0, you must install on your PC the development environment for jAPS 2.0 platform. See the document jAPS2.0 - Instantiate a New Portal - HowTo.
Additional informations may be obtained through the following two mailing-lists:
<japs-devs@lists.sourceforge.net>, focused on developers<japs-users@lists.sourceforge.net>, focused on final users
Table of Contents
First of all, we need to download the package jAPS2.0_2.0.4_demo from SourceForge.
Once donwloaded, choose a temporary location and extract the package.
Launch Eclipse and take the following steps in order to import the package jAPS2.0-2.0.4-demo in the workspace:
File, thenImport...Choose
General, thenExisting Projects into Workspace, and press theNextbuttonBrowse and select the directory from which import the project. Obviously, the right directory is the temporary one where you previously extracted the
jAPS2.0-2.0.4-demopackage downloaded from SourceForgeCheck the
Copy projects into workspaceboxPress
Finish
When Eclipse finishes to import, in the Project Explore view of Eclipse will be a new project called jAPS2-demo.
From the Project Explorer, browse the project jAPS2-demo and open the file buildProperties.xml.
located in the root directory of the project. First of all properly comment or uncomment the blocks of properties suited for Microsoft Windows or Linux, following the XML syntax for comments:
<!-- This sentence is commented out -->
I.e. if you are using Windows, you have to comment out the Linux block and uncomment the Windows one. And so on...
Then edit the following properties accordingly with your system settings:
- Name of the web application, the same as the name of the project
<property name="webappname" value="jAPS2-demo" />- Username for the Database
<property name="postgres.username" value="agile" />- Password for the Database
<property name="postgres.password" value="agile" />- Path of the PostgreSQL executables
Windows:
<property name="postgres.bin.path" location="C:\Programmi\PostgreSQL\8.3\bin" />Linux:
<property name="postgres.bin.path" location="/usr/bin" />
Now edit some properties for the execution phase. Open the file Java Resources: src,Libraries,WebContent,
WEB-INF,conf,systemParams.properties.
Edit the paths in the following properties, adapting the part which specifies the directory of the workspace.
Example 2.1. systemParams.properties on Windows
logFilePrefix=C:\\workspace\\jAPS2-demo\\build\\temp\\japs_log resourceDiskRootFolder=C:\\workspace\\jAPS2-demo\\WebContent\\resources\\ protectedResourceDiskRootFolder=C:\\workspace\\jAPS2-demo\\WebContent\\protected\\ indexDiskRootFolder=C:\\workspace\\jAPS2-demo\\build\\temp\\indexdir
Example 2.2. systemParams.properties on Linux
logFilePrefix=/home/workspace/jAPS2-demo/build/temp/japs_log resourceDiskRootFolder=/home/workspace/jAPS2-demo/WebContent/resources/ protectedResourceDiskRootFolder=/home/workspace/jAPS2-demo/WebContent/protected/ indexDiskRootFolder=/home/workspace/jAPS2-demo/build/temp/indexdir
jAPS2.0 demo needs two databases, respectively jAPS2-demoPort and jAPS2-demoServ.
Ant can automagically create and populate the two databases for you:
Warning
The next procedure completely deletes the two databases if already present.
Please consider doing a backup before proceeding further.
Drag the file
build.xmland drop it in the Ant view (it will be then listed with the namejAPS2-demoExpand the main node and launch (i.e. with a double-click) the
Pg db full updatetask
Because demo is a Dynamic Web Project, now you can configure the server for the execution of the web application during the development.
Choose
File,New,Other,Serverto launch the wizardSelect
Apache - Tomcat v6.0 server, then press theNextbuttonIn the window
Tomcat Serverset the Tomcat installation directory (i.e. the directory where you installed Apache Tomcat in [Chapter 3. Software Requirements]), the press theNextbutton againAdd
myportalto the list of projects configured on this server, then press theFinishbutton
If everything works fine, Eclipse compiles and deploys the web application in a directory of its own (which we are not interested
in knowing at the moment). From now on, you can launch the web application with right mouse button on the project then choosing Run As...,
Run on Server.
If a server selection window appears, select the server you just created. You can also get rid of this window checking the
Always use this server when running this project setting.
If everything is ok, you can see the homepage of your demo portal pointing your preferred browser to http://localhost:8080/jAPS2-demo/.
Table of Contents
In this chapter we describe the guidelines for an alternative configuration of demo portal for system administrator.
First of all, we need to follow the steps describe in the paragraphs
- Basic Configuration
- File:
buildProperties.xml - Create and populate demo databases.
Then, follow the guidelines describe in the next paragraphs.
Edit the file buildProperties.xml located in the root directory of the project. It is necessary to modify the parameters according to the server used.
<!-- This sentence is commented out -->
I.e. if you are using Windows, you have to comment out the Linux block and uncomment the Windows one. And so on...
Then edit the following properties accordingly with your system settings for Tomcat path:
<property name="tomcat.home.path" value="C:\\tomcat6" /><property name="logPrefixPath" value="${tomcat.home. path}\\logs\\${webappname}_log" /><property name="cacheDiskRootFolder" value="${tomcat. home.path}\\webapps\\${webappname}\\cache" /><property name="resourceDiskRootFolder" value="${tomc at.home.path}\\webapps\\${webappname}\\resources" /><property name="protectedResourceDiskRootFolder" value ="${tomcat.home.path}\\webapps\\${webappname}\\protected" /><property name="indexDiskRootFolder" value="${tomcat. home.path}\\webapps\\${webappname}\\indexdir" /><property name="cachePropertiesFilePath" value="\\WEB-INF\\conf\\oscache.properties" />
Ant can automatically create the .War package
Drag the file
build.xmland drop it in the Ant view (it will be then listed with the namejAPS2-demoExpand the main node and launch (i.e. with a double-click) the
War build(create the file jAPS2-demo.war in the directory workspace\temp\jAPS2-demo\dist) andWar deploy(copy the file jAPS2-demo.war in Tomcat webapps) tasks
If everything works fine, you can launch the web application starting Tomcat.
If everything is ok, you can see the homepage of your demo portal pointing your preferred browser to http://localhost:8080/jAPS2-demo/.
