[Liferay] liferay is reduced, liferay is simplified, and Portlet loading is canceled

Source: Internet
Author: User

Liferay version : Liferay-portal-6.1.1-ce-ga2

Server : Tomcat 7.0.25


Liferay is very large. The portal comes with dozens of Portlet, but you can choose to load the Portlet that comes with the portal as needed.


Benefits:

1. Improved startup speed (performance)

2. The interface can be more concise. After all, no Portlet is needed.


Look at Xuan Hu, it's actually very simple, just in liferay 6.1

1. Open the portal's liferay-portlet.xml

2. Add <include> false </include> to the Portlet configuration that does not need to be loaded.

<Portlet> <Portlet-Name> 16 </Portlet-Name> <icon>/html/icons/currency_converter.png </icon> <Struts-path> currency_converter </Struts-path> <preferences-owned-by-group> false </preferences-owned-by-group> <use-default-template> false </use-default-template> <remoteable> true </remoteable> <private-request-attributes> false </private-request-attributes> <private-session-attributes> false </private-session-attributes> <render-weight> 0 </render-weight> <CSS-class-wrapper> Portlet-currency-converter </CSS-class-wrapper> <include> false </include> </Portlet>


Note that the <include> false </include> parameters in the Portlet must follow the specified sequence. For example, after CSS-class-wrapper

3. Restart the service to check the effect.


If you are interested, take a look at the liferay-portlet.xml's DTD file liferay-portlet-app_6_1_0.dtd.

The <include> attribute is described in detail.


Set the include value to true to if the Portlet is available to the portal. If
Set to false, the Portlet is not available to the portal. The default value is
True.


Portlets that are not supported ded as part of the portal are never available to
User to be made active or inactive. As far the user knows, the portlets do not
Even exist in the system. This allows the liferay developers to bundle a lot
Portlets in one core package, and yet allow custom deployments to turn on or off
Individual portlets or sets of portlets. This follows the Siebel and Microsoft
Model of bundling everything in one core package, but using xml configuration or
Registry settings to turn on and off features or sets of features.


We do not recommend that custom deployers modify the core source by removing
Specific portlets because this prevents an easy upgrade process in the future.
The best way to turn on and off portlets is to set the include element.
Advantage of this way of doing things is that it becomes very easy to deploy
Liferay. All features are available in one package. The disadvantage is that
Not utilizing all of the portlets, you are wasting disk space and may even take
A small but static memory footprint. However, we feel that the extra disk space
And memory usage is a cheap price to pay in order to provide an easy
Installation and upgrade path.


[Liferay] liferay is reduced, liferay is simplified, and Portlet loading is canceled

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.