Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Mike Lin
HOWTO: Disable and turn off unused filters
March 29, 2012 6:07 PM
Answer

Mike Lin

Rank: New Member

Posts: 1

Join Date: March 29, 2012

Recent Posts

I am trying to disable some of the filter to increase the performance.
After a bit of research, I've found the following methods to disable filters. (http://www.liferay.com/community/wiki/-/wiki/1071674/Slimming+Liferay+Portal)

  1. Add entries to disable the filter in portal-ext.properties
    com.liferay.portal.servlet.filters.i18n.I18nFilter=false
  2. Remove or comment out the entries from web.xml
    <!--
    ...
    <servlet>
    <servlet-name>I18n Servlet</servlet-name>
    <servlet-class>com.liferay.portal.servlet.I18nServlet</servlet-class>
    <load-on-startup>2</load-on-startup>
    </servlet>
    ...
    -->


I've removed the entries in liferay-portal-src-6.0-ee-sp1\portal-web\docroot\WEB-INF\web.xml
The problem is that the entries of filter have inserted back in \ROOT\WEB-INF\web.xml after I deployed the Liferay.
I want to know what will be the proper way to disable and turn off filters.

Thanks in advance
David H Nebinger
RE: HOWTO: Disable and turn off unused filters
March 29, 2012 7:51 PM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 8378

Join Date: September 1, 2006

Recent Posts

You must have missed the part where it says "NEVER NEVER NEVER modify the source code directly!"

All you need to do is disable them in portal-ext.properties, then go to the deployed ROOT/WEB-INF/web.xml file and remove them there.

You should never ever be modifying, building, or deploying from the source itself unless you know what you're doing.
Hitoshi Ozawa
RE: HOWTO: Disable and turn off unused filters
March 29, 2012 8:35 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7952

Join Date: March 23, 2010

Recent Posts

As David said, if you just want to modify the web.xml file, you should just do it on your server. However, you're probably not building Liferay from source just to change the web.xml file and to modify some other settings written in the performance guide. You can look at the build xml files in the source because that's where the deployment steps are defined. If you look at the definitions, you'll find that it depends on which application server you're using.