There are several ways to append content to an existing file in Java. Below three ways to do it : Using FileWriter Using java.nio.file.Files Using Apache Commons IO FileUtils 1- Using FileWriter JDK 1.4+ Since...
Monthly Archive: April 2016
Setup Liferay DB2 Database
Follow these instructions to configure your Liferay portal with DB2 SGBD : Downloading the jdbc Driver To download the DB2 jdbc Driver, follow these instructions : Go to the official IBM site Choose the appropriate...
Liferay JSF IPC using public render parameters (Inter Portlet Communication)
Introduction Once a portlet is placed on a portal page, its data is not directly shared with other portlets. IPC (Inter Portlet Communication) defines the ways that a Portlet can interact and communicate with another...
Setup Liferay Derby Database
Follow these instructions to configure your Liferay portal with Derby DB SGBD : Downloading the jdbc driver Liferay don’t provide natively a Derby DB jdbc driver. You must download it. Follow these instructions to...
Liferay JSF IPC using event (Inter Portlet Communication)
Introduction Once a portlet is placed on a portal page, its data is not directly shared with other portlets. IPC (Inter Portlet Communication) defines the ways that a Portlet can interact and communicate with another...
Java LDAP SSL authentication
In this article, we will see how to make a secured LDAP authentication using Java. First thing to do is importing the trust certificate to Java keystore. The default java keystore is named cacerts and...
4 ways to delete folder recursively in Java
If you try to delete a not empty folder, a java.nio.file.DirectoryNotEmptyException will be thrown. This tutorial will show 4 differents ways to delete folder recursively in Java : Native Java WalkFileTree Apache Commons IO SpringUtils...
Setup Liferay PostgreSQL Database
Follow these instructions to configure your Liferay portal with PostgreSQL SGBD : Downloading the jdbc Driver For PostgreSQL, there is no need to download the jdbc driver. When Liferay detects you want to use PostgreSQL,...
Setup Liferay MySQL Database
Follow these instructions to configure your Liferay portal with MySQL SGBD : Downloading the jdbc Driver For MySQL, there is no need to download the jdbc driver. When Liferay detects you want to use MySQL,...
Liferay IPC using event (Inter Portlet Communication)
Introduction Once a portlet is placed on a portal page, its data is not directly shared with other portlets. IPC (Inter Portlet Communication) defines the ways that a Portlet can interact and communicate with another...