Wednesday, August 21, 2013

Useful Liferay Links

Liferay Tunning
http://www.liferay.com/web/shuyang.zhou/blog/-/blogs/2609369
http://www.liferay.com/documents/guest/Whitepapers/Technical%20-%20Admin/LPEE%206.0%20Deployment%20Checklist-ac.pdf
http://www.liferay.com/community/wiki/-/wiki/Main/Performance

Ehcache Configuration
http://www.liferay.com/community/wiki/-/wiki/Main/ehCache+Configuration/maximized

Configure Apache Infornt of Liferay
https://www.dnebinger.com/wiki/-/wiki/Setup+and+Configuration/Fronting+Liferay+Tomcat+with+Apache+HTTPd+daemon
http://etapix.com/2011/06/14/tomcat-6-0-26-liferay-6-and-apache-web-server-setup/
http://www.liferay.com/community/wiki/-/wiki/Main/Changing+context+path+of+portal
http://www.liferay.com/community/wiki/-/wiki/Main/Implement+https+feature+using+Apache+http+server


Responsive web design
http://coding.smashingmagazine.com/2011/01/12/guidelines-for-responsive-web-design/
http://www.liferay.com/web/nathan.cavanaugh/blog/-/blogs/8907527.

Liferay Expando Feature & Custom fields
http://www.liferay.com/web/raymond.auge/blog/-/blogs/715049
http://www.liferay.com/community/wiki/-/wiki/Main/Search+for+objects+by+custom+attributes

Liferay Wrapper plugin
http://www.liferay.com/web/juan.fernandez/blog/-/blogs/4586048

Add Javascript to every page in Liferay site
http://www.liferay.com/web/samuel.kong/blog/-/blogs/adding-a-javascript-to-every-page

Liferay Permission System
http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Permissioning+Explained
http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/security-and-permissio-4
http://www.liferay.com/web/joseph.shum/blog/-/blogs/960320

Liferay Themes & Velocity variables
http://innovationliferay.blogspot.com/p/theme-complete-tutorial.html
http://www.liferay.com/community/forums/-/message_boards/message/18331562

Open Web Analytics - Liferay
http://piwik.org/

Overriding and adding struts actions from hook plugins
http://www.liferay.com/web/mika.koivisto/blog/-/blogs/7132115 

Liferay 6.1 Features
http://www.liferay.com/web/james.falkner/blog/-/blogs/11927282

Liferay Versioning explained
http://www.liferay.com/web/jorge.ferrer/blog/-/blogs/explaining-the-new-versioning-scheme-for-liferay-6

Liferay known vulnerabilities
http://www.liferay.com/community/security-team/known-vulnerabilities





Thursday, May 23, 2013

How to - Manually remove/delete ext env from liferay




Whenever you want to undeploy ext env from liferay, please delete below files and folders. These steps are applicable to any liferay version after 6.0

On Windows
Add below commands to a batch file and run it.
@echo off
set app_name=%1
if "%app_name%" == "" goto end
set tomcat_home=C:\apps\liferay-portal-6.0-ee\tomcat-6.0.29

rmdir /S /Q %tomcat_home%\temp
rmdir /S /Q %tomcat_home%\webapps\%app_name%-ext
rmdir /S /Q %tomcat_home%\webapps\ROOT\html\portlet\ext
del /S /Q %tomcat_home%\lib\ext\ext-%app_name%-ext-service.jar
del /S /Q %tomcat_home%\webapps\ROOT\WEB-INF\lib\ext-%app_name%-ext-util-bridges.jar
del /S /Q %tomcat_home%\webapps\ROOT\WEB-INF\lib\ext-%app_name%-ext-util-taglib.jar
del /S /Q %tomcat_home%\webapps\ROOT\WEB-INF\lib\ext-%app_name%-ext-util-java.jar
del /S /Q %tomcat_home%\webapps\ROOT\WEB-INF\lib\ext-%app_name%-ext-impl.jar
del /S /Q %tomcat_home%\webapps\ROOT\WEB-INF\ext-%app_name%-ext.xml
del /S /Q %tomcat_home%\webapps\ROOT\WEB-INF\tiles-defs-ext.xml
del /S /Q %tomcat_home%\temp\liferay\com\liferay\portal\deploy\dependencies\ext-%app_name%-ext-util-bridges.jar
del /S /Q %tomcat_home%\temp\liferay\com\liferay\portal\deploy\dependencies\ext-%app_name%-ext-util-taglib.jar
del /S /Q %tomcat_home%\temp\liferay\com\liferay\portal\deploy\dependencies\ext-%app_name%-ext-util-java.jar
:end

On Linux/Unix
Add below commands to shell script and run it.

#!/bin/sh

if [ $# -ne 1 ]; then
 echo "Usage: clean-my-ext [ext-name]"
 exit 1
fi

tomcat_home="/local/mnt/apps/liferay/tomcat-6.0.29"
app_name="$1"

rm -rf $tomcat_home/temp
rm -rf $tomcat_home/webapps/$app_name-ext
rm -rf $tomcat_home/webapps/ROOT/html/portlet/ext
rm -f $tomcat_home/lib/ext/ext-$app_name-ext-service.jar
rm -f $tomcat_home/webapps/ROOT/WEB-INF/lib/ext-$app_name-ext-util-bridges.jar
rm -f $tomcat_home/webapps/ROOT/WEB-INF/lib/ext-$app_name-ext-util-taglib.jar
rm -f $tomcat_home/webapps/ROOT/WEB-INF/lib/ext-$app_name-ext-util-java.jar
rm -f $tomcat_home/webapps/ROOT/WEB-INF/lib/ext-$app_name-ext-impl.jar
rm -f $tomcat_home/webapps/ROOT/WEB-INF/ext-$app_name-ext.xml
rm -f $tomcat_home/webapps/ROOT/WEB-INF/tiles-defs-ext.xml
rm -f $tomcat_home/temp/liferay/com/liferay/portal/deploy/dependencies/ext-$app_name-ext-util-bridges.jar
rm -f $tomcat_home/temp/liferay/com/liferay/portal/deploy/dependencies/ext-$app_name-ext-util-taglib.jar
rm -f $tomcat_home/temp/liferay/com/liferay/portal/deploy/dependencies/ext-$app_name-ext-util-java.jar


JSR 168 vs JSR 286

FeaturesJSR 168 SpecificationJSR 286 Specification
Inter Portlet Communication
  • Only supported within the same portlet application using session attributes
  • Target portlets will only "see" messages during next render request.
Add additional coordination capabilities
  • Limited only to String Values.
  • Sharing of session data beyond the current Portlet application.
  • Sharing of render parameters across portlets.
Life cyclePortlets cannot update their state during a render request: "event" handling not really possibleNew 3rd life cycle phase before rendering
Portlet FiltersDoesn't Support
  • Supports Allow on the fly transformations of information in both the request to and the response from the portlet
  • Defined in portlet.xml
Caching
  • Extended Cache support.
  • Allow public cached content for multiple users
Common Web Frameworks
  • Servlet dispatching not supported from process Action.
  • Needs Portals Bridges or similar solutions.
  • JSTL support very limited
  • Extended Cache support.
  • Allow public cached content for multiple users.
  • Improved support for web frameworks (Struts, JSF, Spring) Allow servlet dispatching during all lifecycle calls: processAction, processEvent, render, serverResource.
  • Extended JSP tag library <defineObjects/>, support for JSF
Non HTML Resources(pdf, doc, images etc.)
  • A portlet can only render html fragments.
  • Have to fallback/delegate to the servlet container.
  • Requires coordination between portlet and servlet.

Wednesday, November 21, 2012

Remote Debugging - Liferay/Eclipse

Remote debugging is very useful feature that we can rely to troubleshoot issues. Please follow the below steps to enable remote debugging on Liferay server.

>> Double click on the Liferay server in eclipse
Add the following configuration at the end of Liferay settings -> Memory args
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n



This will open the tomcat server in debug mode at port 8000.

>> Now open the debug configurations in eclipse and select "Remote Java Application"
>> Right click and click on "New". This will open up below dialog.


>> Use browse and select the project that you want to debug.  Change the Host and Port accordingly. Since I opened tomcat in debug mode under port 8000, I leave it as is. If you open tomcat in debug under different   port, update here with same. Also update the Host if the Liferay server is running at different location(host).
>> (This step is optional) Now go to common tab and check the Debug option under "Display in favorites menu"). Accept the other defaults and click on "Apply".
>> Now go back to the project and open the java source file where you want to debug the code. Now double click on the line to add the breakpoint.
>> Start the liferay server. Go to debug icon now select the project and click on it
>> Navigate thru the application and eclipse will stop at the break point you set in the java file. That's it.

Wednesday, October 31, 2012

Useful Eclipse Plugins for Java/Liferay developers

Useful Eclipse Plugins
Veloeclipse - http://propsorter.sourceforge.net/veloeclipse
Easy Shell - http://pluginbox.sourceforge.net
Find Bugs - http://findbugs.cs.umd.edu/eclipse/
Liferay IDE -  http://releases.liferay.com/tools/ide/eclipse/indigo/stable/
Mouse Feed - http://update.mousefeed.com
Sonar - http://dist.sonar-ide.codehaus.org/eclipse/