Do It The jAPS Way
Copyright © 2011 Tzente 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".
2011-03-03
| Revision History | ||
|---|---|---|
| Revision 1.6 | 2011-03-03 | MEM |
|
Revisione for the release of jAPS 2.2.0 | ||
| Revision 1.5 | 2010-03-17 | MEM |
|
Update to version 2.0.10 | ||
| Revision 1.4 | 2009-11-13 | GC |
|
Update to version 2.0.8 | ||
| Revision 1.3 | 2009-07-23 | 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 entando (Relative to package jAPS 2.0 entando Portal Example Project). This guide is recommended for technical users who want to customise 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 entando (Relative to package jAPS demo). This guide is recommended for technical users who want to customize a portal. Using the demo, users have the opportunity to try services and features of jAPS 2.0 entando platform.
This document is for developers aiming to customize a portal beginning from a portal example built with jAPS 2.0 entando.
In order to take the maximum advantage of 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 entando, you must install on your PC the development environment for jAPS 2.0 entando platform. See the document jAPS2.0 - Instantiate a New Portal - HowTo.
Additional informations may be obtained through the official mailing-lists:
<japs-platform@googlegroups.com>, "japs-platform" Google Group, the jAPS 2.0 entando official Mailing List
Is it also possible to refer to the documentation found in the:
jAPS 2.0 entando is an Open Source, professional "Enterprise Accessible Information Platform" that makes easier aggregation, publishing, access, customization and integration of information, services, processes and resources, complying with accessibility requirements of W3C WCAG standards.
jAPS 2.0 entando Platform provides performance, reliability and scalability features typical of enterprise software (“Enterprise”), allows users with disabilities to access and manage information and services ("Accessible"), seeks to simplify content management ("Information") and it can be used as a framework ("Platform") to build vertical applications based on contents (Content Enabled Vertical Application).
Table of Contents
First of all, we need to download the package
jAPS 2.0 entando Portal Example Project from SourceForge.
Note the the packeages are inside the folder jAPS 2.0 entando PortalExample Project and
jAPS2.0_entando-2.2.0-PortalExample-Project. Choose the version that fits your needs;
Once donwloaded, choose a temporary location and extract the package.
Launch Eclipse and follow the steps below to import the package jAPS 2.0 entando Portal Example Project 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
Portal Example Projectpackage 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 PortalExample.
From the Project Explorer, browse the project PortalExample 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="PortalExample" />- 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 configuration params for the execution phase.
Open the file Java Resources: src,Libraries,WebContent,
META-INF,context.xml.
Edit the paths in the following properties, adapting the part which specifies the directory of the workspace.
Example 3.1. context.xml on Windows
<Environment name="logFilePrefix" value="C:\\workspace\\PortalExample\\build\\temp\\japs_log" type="java.lang.String" override="false" /> <Environment name="resourceDiskRootFolder" value="C:\\workspace\\PortalExample\\WebContent\\resources\\" type="java.lang.String" override="false" /> <Environment name="protectedResourceDiskRootFolder" value="C:\\workspace\\PortalExample\\WebContent\\protected\\" type="java.lang.String" override="false" /> <Environment name="indexDiskRootFolder" value="C:\\workspace\\PortalExample\\build\\temp\\indexdir" type="java.lang.String" override="false" /> <Environment name="cacheDiskRootFolder" value="C:\\workspace\\PortalExample\\build\\temp\\cache" type="java.lang.String" override="false" />
Example 3.2. context.xml on Linux
<Environment name="logFilePrefix" value="/home/agile/workspace/PortalExample/build/temp/japs_log" type="java.lang.String" override="false" /> <Environment name="resourceDiskRootFolder" value="/home/agile/workspace/PortalExample/WebContent/resources/" type="java.lang.String" override="false" /> <Environment name="protectedResourceDiskRootFolder" value="/home/agile/workspace/PortalExample/WebContent/protected/" type="java.lang.String" override="false" /> <Environment name="indexDiskRootFolder" value="/home/agile/workspace/PortalExample/build/temp/indexdir" type="java.lang.String" override="false" /> <Environment name="cacheDiskRootFolder" value="/home/agile/workspace/PortalExample/build/temp/cache" type="java.lang.String" override="false" />
jAPS2.0 demo needs two databases, respectively PortalExamplePort and PortalExampleServ.
Ant can automatically create and populate the two databases for you:
Warning
The following procedure will completely delete the two databases if already present.
You are strongly advised to make a backup of your databases before proceeding.
Drag the file
build.xmland drop it in the Ant view (it will be then listed with the name)PortalExampleExpand 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 portal example pointing your preferred browser to http://localhost:8080/PortalExample/.
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 namePortalExampeExpand the main node and launch (i.e. with a double-click) the
War build(create the file PortalExampe.war in the directory workspace\temp\PortalExampe\dist) andWar deploy(copy the file PortalExample.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 portal example pointing your preferred browser to http://localhost:8080/PortalExampe/.
