Skip to content

Instantly share code, notes, and snippets.

View jverweijL's full-sized avatar
💭
🏴‍☠️

Jan Verweij jverweijL

💭
🏴‍☠️
View GitHub Profile
@jverweijL
jverweijL / README.md
Last active October 13, 2020 11:55
Using mailtrap.io with Liferay DXP

How to use mailtrap.io with Liferay DXP

When setting up Liferay DXP it's necessary to add an smtp-server e.g. for resetting your password. For testing/development purpose it's easier to use a service like mailtrap.io. Simply add the portal-ext.properties with the right settings and you are good to go without spamming your users.

@jverweijL
jverweijL / README.md
Last active May 10, 2017 11:18
Public rest services overview
@jverweijL
jverweijL / README.md
Last active May 15, 2017 10:33
Avoid caching for development

This is my portal-ext configuration to avoid static resources being cached after a new deployment in Liferay DXP. Mainly used for development purpose.

com.liferay.portal.servlet.filters.cache.CacheFilter=false
com.liferay.portal.servlet.filters.etag.ETagFilter=false
com.liferay.portal.servlet.filters.header.HeaderFilter=false
com.liferay.portal.servlet.filters.themepreview.ThemePreviewFilter=true
theme.css.fast.load=false
layout.template.cache.enabled=false
browser.launcher.url=
@jverweijL
jverweijL / README.md
Last active July 5, 2017 09:06
Recipe for installing Elasticsearch with Liferay DXP

Prerequisites

Before following this tutorial, you will need:

  • A Ubuntu 16.04 Droplet set up by following the Initial Server Setup with Ubuntu 16.04, including creating a sudo non-root user.

  • The Oracle JDK 8 installed, which you can do by following the "Installing the Oracle JDK" section of this Java installation article

Except otherwise noted, all of the commands that require root privileges in this tutorial should be run as a non-root user with sudo privileges.

Step 1 - Find the Right Version of Elasticsearch

@jverweijL
jverweijL / README.md
Last active January 11, 2022 16:56
Simple example to sent emails using Liferay DXP with Freemarker template

The line TemplateResource templateResource = new URLTemplateResource("0",this.getClass().getClassLoader().getResource("personal_alert.ftl")); will load the template from src/main/resources

package com.liferay.alerter;

import java.io.StringWriter;

import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
@jverweijL
jverweijL / form-data-to-rest.xml
Created September 29, 2017 12:26
This is a workflow xml example for Liferay DXP (7.0) to sent form data through a workflow to an external rest service.
<?xml version="1.0"?>
<!-- this workflow will sent data from a simple form (subject and description field) to an external rest service -->
<workflow-definition
xmlns="urn:liferay.com:liferay-workflow_7.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:liferay.com:liferay-workflow_7.0.0 http://www.liferay.com/dtd/liferay-workflow-definition_7_0_0.xsd">
<name>Logger</name>
<description></description>
<version>1</version>
<state>
<name>Start</name>
@jverweijL
jverweijL / enable S3.md
Last active November 1, 2021 14:30
Using S3 repo with Liferay DXP (7.0)

Enable S3 repository storage

This gist is based on Liferay DXP (7.0) with Tomcat

  1. Create system-ext.properties in /WEB-INF/classes

  2. Add org.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser to system-ext.properties

  3. Create com.liferay.portal.store.s3.configuration.S3StoreConfiguration.cfg in osgi/configs

    accessKey=
    secretKey=

@jverweijL
jverweijL / README.md
Last active July 19, 2023 13:02
Install Liferay as a Service on Ubuntu 16.04
sudo nano /etc/systemd/system/liferay.service

Add the following contents (make sure to user your own paths)

[Unit]
Description=Liferay Apache Tomcat Web Application Container
After=network.target
@jverweijL
jverweijL / _README.md
Last active March 7, 2019 14:15
Some samples to show how you can use ADT's in Liferay (tested with 7.1)

Some ADT examples for Liferay 7.1