Liferay 7 Portal Installation
These instructions install the Cogix Survey portlet and the
ViewsFlash application in Liferay Portal version 7.
- Download the liferay 7 ViewsFlash.zip file. Unpack the zip file, which contains a ViewsFlash.war file
and a ViewsFlash-1.0.0.jar file.
- Create a directory /etc/cogix at the drive's root level; if on
Windows, use the drive that Liferay is installed on, e.g.: C:\etc\cogix.
- Create /etc/cogix/viewsflash.properties using a text editor.
data=/etc/cogix (on Windows, use C:\\etc\\cogix)
license=who=your_company;......;licensekey=63-85-90-91-0E-07-2E-AC-E7-9A-F1-BB-17-C5-AB-87-
apiattribute=com.cogix.vwf.api
appsecurity=user
administrators=joebloggs
For the license parameter above, request a license from Cogix.
If you don't have a key, omit the license parameter. The software will
add an "Evaluation Copy" message, and will work for 30 days.
For additional parameters, see http://www.cogix.com/docs/vf90/?Installation.html.
Do not follow the step by step installation procedure; follow these
steps instead.
NOTE: If you don't want to store viewsflash.properties in the /etc/cogix directory, then unpack
the ViewsFlash.war file, modify WEB-INF/web.xml to include a
propertiesfile
init-param that points to where you want to store
viewsflash.properties, and
repack the ViewsFlash.war file. The web.xml file includes a commented
out section
that does this. You can also specify any parameters in
viewsflash.properties as init-param elements in
web.xml and avoid using viewsflash.properties altogether.
If your portal administrator is not joebloggs, use the appropriate screen name instead.
- Create a JNDI Data Source named "ViewsFlash" for the application.
Make sure that the appropriate JDBC drivers are in the classpath
and the the JNDI Data Source definition includes the credentials of a database user
with CREATE TABLE and ALTER TABLE privileges.
For more information, see Using a database.
- Deploy the ViewsFlash.war file as an application in yuour application server. In Tomcat, for example,
copy the ViewsFlash.war file to the webapps directory. While this is happening, monitor the application
server logs for any errors. The most common error is a misconfigured Data Source.
- After deploying the war file successfully, drop the ViewsFlash-1.0.0.jar
in the liferay7 deploy directory. Monitor the application server log for a successful startup
message: STARTED ViewsFlash_1.0.0.
-
Logged in as the joebloggs administrator, go to any page in the portal and add the Survey application.
Open its Configuration and click on Configure Surveys. Now perform the post-deployment steps
starting with step 1. Close the Configuration page, and open the portlet Permissions
and grant thee appropriate Roles. Many instances of the Survey portlet can be created on different pages.
Each one operates independently of the others. Do not add more than one instance on the same page.
Securing the application
You may notice that the Viewsflash application is not protected with security constraints.
The portlet application passes the encrypted ID of the current portal user to the application in the URL.
You can set your own unique encryption key by adding the same parameter to both viewsflash.properties and portal-ext.properties:
com.cogix.surveyportlet.adage=This is my secret pass phrase
After adding these parameters, restart the app server.
Updating the ViewsFlash application and portlet
To update survey portlet and ViewsFlash application with a new
version from Cogix, repeat the installation steps above and restart Liferay.
Updating from Liferay 6 to Liferay 7
Begin by migrating the portal from Liferay 6 to Liferay 7. In the upgrade process,
a new application server is created and
the Liferay configuration stored in its database is upgraded.
Make sure that the new application server defines the same Data Source for ViewsFlash
and that the JDBC drivers are present. Review the viewsflash.properties and be sure to add
apiattribute, appsecurity and adminstrators parameters.
When the new Liferay 7 portal starts, pages that contain the Survey portlet will
have an error message indicating that the portlet has been undeployed. At this point, deploy
the war file and then the jar file, as described above. Once that's done, the Survey applications
will work as they used to.
Reference: https://dev.liferay.com/discover/deployment/-/knowledge_base/7-0/upgrading-to-liferay-7#gogo-shell-commands-for-module-upgrades
Hosting the ViewsFlash application on separate servers
Starting with the Liferay 7 version of the ViewsFlash survey portlet, it is possible
to deploy most of the ViewsFlash application to a separate server cluster. Each Liferay instance still needs to have the Survey portlet,
ViewsFlash-1.0.0.jar, deployed. But the ViewsFlash.war web application can be deployed in a different application server, on any port,
where it is shared by all the Liferay portal instances. The ViewsFlash app server can be a load balanced cluster.
While this is a little bit slower than hosting both components on all Liferay instances,
it reduces the CPU and memory requirements on the Liferay instances, which usually are fairly heavily loaded.
For this configuration, add the following parameter to portal-ext.properties, like this:
com.cogix.surveyportlet.ViewsFlashURL=http://theviewsflashappserver.com:7777/ViewsFlash
Configure the ViewsFlash application
Continue with
Using the portlet.