Posts

Showing posts with the label portal.properties

Session TimeOut

In Liferay session timeout will be 30 mins by default. If you were idle for 30 mins liferay will expire the session. Sometimes based on the requirement we want to increase the session timeout. So look into the portal.properties  file and search for the "session.timeout"  we can see the  minutes it was set. By default it was 30 minutes. # # Specify the number of minutes before a session expires. This value is # always overridden by the value set in web.xml. # session.timeout=30 Even if we increase this value it would effect because it will be override the entry in the web.xml . so as best option remove the entry in the web.xml Navigate to the tomcat folder as <tomcat>/webapps/ROOT/WEB-INF/web.xml Search for the entry " session-timeout " you can find the following snippets. 30 Remove this entry in the web.xml and increase the value in the portal-ext.properties to your value, suppose if i need to increase the session t...

Supported properties in hook by liferay

In Liferay we know that we can override some of the properties using hooks. To remember all those supported properties is quite difficult. Also how can we know  whether that particular properties  is supported or not ? So we have class called  HookHotDeployListener class to check the supported properties. Look into the  SUPPORTED_PROPERTIES string array variable where it listed all the supported properties. This is how it is listed public class HookHotDeployListener extends BaseHotDeployListener implements PropsKeys { public static final String[] SUPPORTED_PROPERTIES = { "admin.default.group.names", "admin.default.role.names", "admin.default.user.group.names", "asset.publisher.asset.entry.query.processors", "asset.publisher.display.styles", "asset.publisher.query.form.configuration", "auth.forward.by.last.path", "auth.public.paths", "auth.verifier.pipeline", "auto.deploy.liste...

Encryption and Decryption In Liferay

In Liferay , you can encrypt and decrypt  the senstive data. Liferay has provided easy way to encrypt the data. Have a look at the  Encryptor class , we find the methods to encrypt and decrypt the data. Here is an example of encryption of data. private String encrptData(ActionRequest actionRequest,String data ) throws PortalException, SystemException, EncryptorException{ ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest. getAttribute(WebKeys.THEME_DISPLAY); Company company = CompanyLocalServiceUtil.getCompany(themeDisplay.getCompanyId()); Key key = company.getKeyObj(); return Encryptor.encrypt(key, data); } The same string we can decrypt the following line as ,                   Encryptor.decrypt(key, data); So we may have an doubt which encryption algorithm liferay is using go to the portal.properties look at the following 2 properties.  company.encryption.algorithm=DES ...