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 #

Páginas descendentes

0 Anexos
112917 Visualizações
Média (4 Votos)
A média da avaliação é 4.25 estrelas de 5.
Respostas do tópico Autor Data
I followed the instruction and after ant war, I... Puj Z 12 de Junho de 2010 12:33
The answer is that the .jar is empty. I am not... Puj Z 14 de Junho de 2010 05:08
ok, new problem: While using the Hello World... Puj Z 14 de Junho de 2010 06:24
Puj Z, Brian's hello world was just simple... Tomas Polesovsky 14 de Junho de 2010 13:24
Thanks Tom! I will try to modify it then.... Puj Z 16 de Junho de 2010 05:52
new Exlet (ext plugin) is a great idea... but... ilke Muhtaroglu 2 de Julho de 2010 04:32
The list of ext-impl files should also include... Tor Iver Wilhelmsen 5 de Agosto de 2010 03:32
Has anyone experienced ext-plugin with Liferay... Sampsa Sohlman 9 de Agosto de 2010 13:48
A lot of thanks to you Tomas for informative... Jakub Liska 8 de Setembro de 2010 04:29
I was able to successfully upgrade the old ext... simeon mitev 12 de Outubro de 2010 02:27
I have custom java class in ext plugin (under... Nagendra Kumar Busam 29 de Outubro de 2010 08:54
Hi all..How to change liferay-ui.tld in... Ezhil Raja 9 de Fevereiro de 2011 04:04
How should i edit Jsp file in extension... Ezhil Raja 9 de Fevereiro de 2011 04:09
"Caused by: org.hibernate.HibernateException:... Ezhil Raja 9 de Fevereiro de 2011 19:40
For liferay 6.0.5 you can undeploy using with... ibrahim çağlar 14 de Abril de 2011 02:49
acho que ainda nao entendi o que exatamente o... ricardo wolosker 7 de Janeiro de 2012 14:56
If we use maven, where we copy est-spring.xml? slimen Belhaj Ali 29 de Dezembro de 2014 07:38
ext-spring.xml should be inside ext-impl.jar... Tomas Polesovsky 19 de Janeiro de 2015 05:44

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!
Postado em 12/06/10 12:33.
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.
Postado em 14/06/10 05:08 em resposta a 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....
Postado em 14/06/10 06:24.
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
Postado em 14/06/10 13:24 em resposta a Puj Z.
Thanks Tom!
I will try to modify it then.
Postado em 16/06/10 05:52 em resposta a 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

Postado em 02/07/10 04:32.
The list of ext-impl files should also include, even though there is an empty such file there already.
Postado em 05/08/10 03:32.
Has anyone experienced ext-plugin with Liferay 5.2 EE sp3 and sp4
Postado em 09/08/10 13:48.
A lot of thanks to you Tomas for informative stuff like this...I wish there was more documentation like this one
Postado em 08/09/10 04:29.
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?
Postado em 12/10/10 02:27 em resposta a 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
Postado em 29/10/10 08:54.
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 ?
Postado em 09/02/11 04:04.
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 ?
Postado em 09/02/11 04:09.
"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.

Postado em 09/02/11 19:40.
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
Postado em 14/04/11 02:49.
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?
Postado em 07/01/12 14:56 em resposta a ibrahim çağlar.
If we use maven, where we copy est-spring.xml?
Postado em 29/12/14 07:38.
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
Postado em 19/01/15 05:44 em resposta a slimen Belhaj Ali.