Intro #

Ext plugins provide the most advanced method of extending Liferay. This comes with some tradeoffs in complexity, and so Ext plugins are designed to be used only in special scenarios in which all other plugin types cannot meet the needs of the project.

Before deciding to use an Ext plugin it's important to understand the costs of using such a powerful tool. The main one is the cost in terms of maintenance. Because Ext plugins allow using internal APIs or even overwriting files provided in the Liferay core, it's necessary to review all the changes done when updating to a new version of Liferay (even if it's a maintenance version or a service pack). Also, unlike the other types of plugins, Ext plugins require the server to be restarted after deployment, as well as requiring additional steps when deploying or redeploying to production systems.

The main use cases in which an Ext plugin may be needed are:

Customizing that are not supported by Hook Plugins Customizing Struts Actions Providing custom implementations for any of the Liferay beans declared in Liferay's Spring files (use service wrappers from a hook instead if possible) Adding JSPs that are referenced from portal properties that can only be changed from an ext plugin (be sure to check if the property can be modified from a hook plugin before doing this) Direct overwriting of a class (not recommended unless it's strictly necessary)

Documentation #

Liferay's developer's guide provides accurate and detailed documentation on how to develop and deploy an Ext plugin. Here are direct links to the chapter on Ext plugins:

Liferay 6.0 > Developer's Guide > Ext Plugins

Ext Plugin vs. Extension Environment #

Ext plugin is light-weight extension of the EXT environment. It use the same paradigms for the class loading and overriding as the old EXT. Light-weight means that you can download only < 10MB (whole Plugins SDK) instead of > 100MB (just old EXT).


For current bugs please see: Ext plugin on

Ext Plugin vs. Extlet #

Ext Plugin is not Extlet. Extlet was created in IBA CZ and it's an ancestor of the Ext Plugin.

The main difference is that Extlet is for Liferay 5.2.3 on Tomcat, Ext Plugin is for Liferay 6.

Empty ext-service.jar problem #

SEVERE: Exception processing JAR at resource path /data/opt/liferay-portal-6.0.2/tomcat-6.0.26/lib/ext/ext-ehlo-ext-service.jar in context error in opening zip file
	at Method)

The problem: the jar file is empty. Workaround: add some folder into your ext-plugin/docroot/WEB-INF/ext-service/src directory

cd plugins-sdk/ext/ehlo-ext
mkdir mkdir docroot/WEB-INF/ext-service/src/META-INF
ant war

Changes from ext-impl.jar are not applied #

The ext-impl.jar contains util- jars zipped inside:

unzip -l your-tomcat-install/webapps/ROOT/WEB-INF/lib/ext-ehlo-ext-impl.jar
       22  06-10-10 22:02   com/liferay/portal/deploy/dependencies/ext-ehlo-ext-util-bridges.jar
       22  06-10-10 22:02   com/liferay/portal/deploy/dependencies/ext-ehlo-ext-util-java.jar
       22  06-10-10 22:02   com/liferay/portal/deploy/dependencies/ext-ehlo-ext-util-taglib.jar

Workaround: delete these jars after deploy from liferay, e.g.

zip -d your-tomcat-install/webapps/ROOT/WEB-INF/lib/ext-ehlo-ext-impl.jar "*.jar"

Ext Plugin can't be undeployed #

Ext Plugin can't be undeployed or even redeployed.


  1. call ant clean from your ext-plugin directory, see Ext plugin thread
  2. or delete ext plugin from your Tomcat (similar for any other app server, sometimes you must undeploy the web application, not just delete it)
    1. Linux - Tomcat:
cd your-tomcat-install
# deleting web application
rm -rf webapps/*-ext
# deleting jars and config files from Liferay
find -name "ext-*" | xargs rm -rf
# stopping Liferay
ps ax | grep life
#... wait until life ends ;) ....#
ps ax | grep life
#... wait until life ends ;) ....#
ps ax | grep life
#... wait until life ends ;) ....#
# Starting Liferay
tail -f logs/catalina.out
    1. Windows - Tomcat: delete all following files & directory and reboot Tomcat (assuming your Ext Plugin is named ehlo-ext):

Related Information #

0 Attachments
Average (4 Votes)
The average rating is 4.25 stars out of 5.
Threaded Replies Author Date
I followed the instruction and after ant war, I... Puj Z June 12, 2010 12:33 PM
The answer is that the .jar is empty. I am not... Puj Z June 14, 2010 5:08 AM
ok, new problem: While using the Hello World... Puj Z June 14, 2010 6:24 AM
Puj Z, Brian's hello world was just simple... Tomas Polesovsky June 14, 2010 1:24 PM
Thanks Tom! I will try to modify it then.... Puj Z June 16, 2010 5:52 AM
new Exlet (ext plugin) is a great idea... but... ilke Muhtaroglu July 2, 2010 4:32 AM
The list of ext-impl files should also include... Tor Iver Wilhelmsen August 5, 2010 3:32 AM
Has anyone experienced ext-plugin with Liferay... Sampsa Sohlman August 9, 2010 1:48 PM
A lot of thanks to you Tomas for informative... Jakub Liska September 8, 2010 4:29 AM
I was able to successfully upgrade the old ext... simeon mitev October 12, 2010 2:27 AM
I have custom java class in ext plugin (under... Nagendra Kumar Busam October 29, 2010 8:54 AM
Hi all..How to change liferay-ui.tld in... Ezhil Raja February 9, 2011 4:04 AM
How should i edit Jsp file in extension... Ezhil Raja February 9, 2011 4:09 AM
"Caused by: org.hibernate.HibernateException:... Ezhil Raja February 9, 2011 7:40 PM
For liferay 6.0.5 you can undeploy using with... ibrahim çağlar April 14, 2011 2:49 AM
acho que ainda nao entendi o que exatamente o... ricardo wolosker January 7, 2012 2:56 PM
If we use maven, where we copy est-spring.xml? slimen Belhaj Ali December 29, 2014 7:38 AM
ext-spring.xml should be inside ext-impl.jar... Tomas Polesovsky January 19, 2015 5:44 AM

I followed the instruction and after ant war, I did ant deploy, which was successful, but when starting tomcat, I get this exception three times:

SCHWERWIEGEND: Exception processing JAR at resource path C:\www6.0\tomcat-6.0.26\lib\ext\ext-service.jar in context /tunnel-w error in opening zip file
at Method)
at java.util.jar.JarFile.<init>(
at java.util.jar.JarFile.<init>(
at org.apache.catalina.startup.TldConfig.tldScanJar(

I did not do the installation part (copy the war to the deploy folder, because I thought ant deploy should actually do all the necessary copying.

I appreciate any helps!
Posted on 6/12/10 12:33 PM.
The answer is that the .jar is empty.
I am not sure if this is an issue or not, but I guess it's better to be able to run an empty ext.
Posted on 6/14/10 5:08 AM in reply to Puj Z.
ok, new problem:

While using the Hello World ext that Brian has offered as the sample Extlet, I see the following error in eclipse for ext-util-taglib\src\com\liferay\taglib\util:
StringServletResponse stringResponse = getServletResponse();
The method getServletResponse() is undefined for the type IncludeTag

I am using all the necessary lib files plus jdk1.6

Should I add any new libraries in addition to what is in $CATALINA_HOME\webapps\ROOT\WEB-INF\lib

It's confusing....
Posted on 6/14/10 6:24 AM.
Puj Z,

Brian's hello world was just simple illustration of the possibilities. I think nowadays the trunk code has slightly changed. Try to use the SVN revision that Brian mentioned:

Use the latest /portal/trunk and /plugins/trunk as of rev 42007.

-- tom
Posted on 6/14/10 1:24 PM in reply to Puj Z.
Thanks Tom!
I will try to modify it then.
Posted on 6/16/10 5:52 AM in reply to Tomas Polesovsky.
new Exlet (ext plugin) is a great idea...

but now how to work within eclipse ? I can not import the new ext plugin into Eclipse easily.

It is just a bunch of folder, and when I try to import it as a folder into a empty java project, those directories without file inside are not created in eclipse! After running ant deploy i get error regarding these missing folders.

Any guidance to have to have new extlet in eclipse environment.

I use eclipse helios and ubuntu with liferay 6.02

Posted on 7/2/10 4:32 AM.
The list of ext-impl files should also include, even though there is an empty such file there already.
Posted on 8/5/10 3:32 AM.
Has anyone experienced ext-plugin with Liferay 5.2 EE sp3 and sp4
Posted on 8/9/10 1:48 PM.
A lot of thanks to you Tomas for informative stuff like this...I wish there was more documentation like this one
Posted on 9/8/10 4:29 AM.
I was able to successfully upgrade the old ext to the new plugin-ext but when I try to build it I get approx. 70 "package does not exist" errors:

: package com.liferay.portlet.tags.model does not exist
public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> findByOrEntryIds(

The package really do not exist in any of the jars copied to the ext.

What could be the problem?
Posted on 10/12/10 2:27 AM in reply to Jakub Liska.
I have custom java class in ext plugin (under ext-impl), when i deploy ext plugin second time after undeploying using the steps mentioned @ the end of the article. It was throwing following error

18:57:27,093 ERROR [RequestProcessor:296] No action instance for path /custom_layout_configuration/view could be created

I am getting this error repeatedly for first time after every deployment, if i restart server again i am not seeing any error

how can i avoid this, thanks in advance
Posted on 10/29/10 8:54 AM.
Hi all..How to change liferay-ui.tld in extension environment.Can i edit directly in liferay-portal-6.0-ee\tomcat-6.0.29\webapps\ROOT\WEB-INF\tld ?
Posted on 2/9/11 4:04 AM.
How should i edit Jsp file in extension environment.I have put my jsp file inside /ehlo-world-ext/docroot/WEB-INF/ext-web/docroot/ROOT/html/portlet/message_boards­ (am modifying file related to message_boards).Even though it took the change inside ehlo-world-ext(webapps)...not refleting in browser. Am i doing in correct way ?
Posted on 2/9/11 4:09 AM.
"Caused by: org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here"

This happens when I happen to use ext-impl.

The approach I took is to copy the changed classes itself to ext-impl and not extend them.

Posted on 2/9/11 7:40 PM.
For liferay 6.0.5 you can undeploy using with ant.
You should add this script to build.xml

<target name="undeploy" depends="clean-ext" >
<property name="" value="${}"></property>
<property name="tomcat.home" value="${}"></property>
<echo>Application Name :"${}"</echo>
<echo>Catalina Home :"${tomcat.home}\webapps\${}-ext"</echo>

<target name="clean-ext">
<delete includeemptydirs="true">
<fileset dir="${tomcat.home}\webapps\${}-ext" includes="**/*" />

<echo>Deleting util-bridges.jar</echo>
<delete file="${tomcat.home}\webapps\ROOT\WEB-INF\lib\ext-${}-ext-util-bridges.j­ar"></delete>
<echo>Deleting util-taglib.jar</echo>
<delete file="${tomcat.home}\webapps\ROOT\WEB-INF\lib\ext-${}-ext-util-taglib.ja­r"></delete>
<echo>Deleting util-java.jar</echo>
<delete file="${tomcat.home}\webapps\ROOT\WEB-INF\lib\ext-${}-ext-util-java.jar"­></delete>
<echo>Deleting ext-impl.jar</echo>
<delete file="${tomcat.home}\webapps\ROOT\WEB-INF\lib\ext-${}-ext-impl.jar"></de­lete>
<echo>Deleting ext-"${}"-ext.xml</echo>
<delete file="${tomcat.home}\webapps\ROOT\WEB-INF\ext-${}-ext.xml"></delete>
<­delete file="${tomcat.home}\temp\liferay\com\liferay\portal\deploy\dependencies\ext-${a­}-ext-util-bridges.jar"></delete>
<delete file="${tomcat.home}\temp\liferay\com\liferay\portal\deploy\dependencies\ext-${a­}-ext-util-taglib.jar"></delete>
<delete file="${tomcat.home}\temp\liferay\com\liferay\portal\deploy\dependencies\ext-${a­}-ext-util-java.jar"></delete>

and create and put properties as above

That's it. Enjoy
Posted on 4/14/11 2:49 AM.
acho que ainda nao entendi o que exatamente o Ext faz. Por exemplo, e se eu quiser implementar um dialeto SQLite, qual classe deveria ser implementada?
Posted on 1/7/12 2:56 PM in reply to ibrahim çağlar.
If we use maven, where we copy est-spring.xml?
Posted on 12/29/14 7:38 AM.
ext-spring.xml should be inside ext-impl.jar META-INF directory:

unzip -l ext-impl.jar
Archive: ext-impl.jar
Length Date Time Name
--------- ---------- ----- ----
0 2012-10-24 12:14 META-INF/
499 2012-10-24 12:14 META-INF/ext-spring.xml
Posted on 1/19/15 5:44 AM in reply to slimen Belhaj Ali.