Created
September 4, 2016 14:57
-
-
Save planetsizebrain/3ae8d1512fbb96bce0d896c0a3559998 to your computer and use it in GitHub Desktop.
A Liferay Groovy script that lists the contents of a file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
java.io.File file = new java.io.File("/opt/liferay/portal-ext.properties"); | |
String s = com.liferay.portal.kernel.util.FileUtil.read(file); | |
out.println(s); | |
} catch (Exception e) { | |
out.println(e.getMessage()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment