Foros de discusión
portal-ext.properties
Haythem Al Shaikh Ahmed, modificado hace 11 años.
portal-ext.properties
New Member Mensajes: 20 Fecha de incorporación: 9/12/12 Mensajes recientes
Hi all,
I have created Liferay’s Ext to modify on the document library's JSPs.
Specifically, I want to modify on toolbars.jsp, its ok, I know how to modify, but i dont know what i change on portal-ext.properties file to appear the enchantments.
So, How can i know which specific attribute i change or set?
Can anyone help me?
Thanks All and Regards,
I have created Liferay’s Ext to modify on the document library's JSPs.
Specifically, I want to modify on toolbars.jsp, its ok, I know how to modify, but i dont know what i change on portal-ext.properties file to appear the enchantments.
So, How can i know which specific attribute i change or set?
Can anyone help me?
Thanks All and Regards,
Sampsa Sohlman, modificado hace 11 años.
RE: portal-ext.properties
Regular Member Mensajes: 230 Fecha de incorporación: 27/09/07 Mensajes recientesHaythem Al Shaikh Ahmed:
Hi all,
I have created Liferay’s Ext to modify on the document library's JSPs.
Specifically, I want to modify on toolbars.jsp, its ok, I know how to modify, but i dont know what i change on portal-ext.properties file to appear the enchantments.
So, How can i know which specific attribute i change or set?
Can anyone help me?
Thanks All and Regards,
Hi Haythem Al Shaikh Ahmed,
Instead of ext-plugin, I would suggest to create a hook plugin. Take a look our Hooks documentation.
Haythem Al Shaikh Ahmed, modificado hace 11 años.
RE: portal-ext.properties
New Member Mensajes: 20 Fecha de incorporación: 9/12/12 Mensajes recientes
Thanks Mr. Sampsa Sohlman
i tried your suggestion before moving to Ext plugin, but again i stuck by the following
i added button on the toolbar.jsp in document library portlet, this button make an action by sending it to my own class in com.liferay.portlet.documentlibrary.action,
also i mapped the action in struts-config.xml and tried in struts-config-ext.xml , in all cases it gives NO Class Found.
Therefore i used the Ext plugin and i see its ease to use but i have some missing issue in properties files, There is no clear documentation for them.
Any suggestion or solution except the examples in development guide?
Thanks again
i tried your suggestion before moving to Ext plugin, but again i stuck by the following
i added button on the toolbar.jsp in document library portlet, this button make an action by sending it to my own class in com.liferay.portlet.documentlibrary.action,
also i mapped the action in struts-config.xml and tried in struts-config-ext.xml , in all cases it gives NO Class Found.
Therefore i used the Ext plugin and i see its ease to use but i have some missing issue in properties files, There is no clear documentation for them.
Any suggestion or solution except the examples in development guide?
Thanks again
Hitoshi Ozawa, modificado hace 11 años.
RE: portal-ext.properties
Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientesbut i have some missing issue in properties files, There is no clear documentation for them.
What missing issues? You're not giving us all the information necessary to answer your question. In the first post, you've only stated that you wanted to modify one jsp file when you actually want to add java classes as well. Liferay is outputting errors because you program has errors. Why do you think there's missing properties in portal-ext.properties?
Haythem Al Shaikh Ahmed, modificado hace 11 años.
RE: portal-ext.properties
New Member Mensajes: 20 Fecha de incorporación: 9/12/12 Mensajes recientes
i want to add the java classes when i tried to use the Hook plugin not Ext plugin, also i think there's missing in portal-ext.properties depend on the development guide
http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/developing-an-ext-plug-4
Anyway, can you help me for this problem?
http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/developing-an-ext-plug-4
Anyway, can you help me for this problem?
Milen Dyankov, modificado hace 11 años.
RE: portal-ext.properties
Expert Mensajes: 310 Fecha de incorporación: 30/10/12 Mensajes recientes
I also think it should be possible to apply your changes by only using hook. Please read carefully:
I suggest to start with a clean Liferay instance and follow the above instructions to avoid problems caused by your previous experiments.
- Overriding web resources and Customizing JSPs without overriding the original sections in Liferay's documentation for information about how to overwrite JSP pages.
- Overriding and adding Struts actions section in Liferay's documentation for information about how to overwrite and/or add struts actions.
I suggest to start with a clean Liferay instance and follow the above instructions to avoid problems caused by your previous experiments.
Hitoshi Ozawa, modificado hace 11 años.
RE: portal-ext.properties
Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
Milen, read Haythem's post. It's difficult to exactly know what's Haythem is trying to do because he's not explaining his situation clearly, but he's also trying to add his own Java classes too. The question is does he have to create a new java class or just add methods to an existing class.
Milen Dyankov, modificado hace 11 años.
RE: portal-ext.properties
Expert Mensajes: 310 Fecha de incorporación: 30/10/12 Mensajes recientesHitoshi Ozawa:
Milen, read Haythem's post. It's difficult to exactly know what's Haythem is trying to do because he's not explaining his situation clearly, but he's also trying to add his own Java classes too. The question is does he have to create a new java class or just add methods to an existing class.
True!
However this:
i mapped the action in struts-config.xml and tried in struts-config-ext.xml
made me think the Haythem is actually trying to provide a custom Struts action - thus the suggestion.
Haythem Al Shaikh Ahmed, modificado hace 11 años.
RE: portal-ext.properties
New Member Mensajes: 20 Fecha de incorporación: 9/12/12 Mensajes recientes
Hi Mr. Milen,
I am applying your suggestion and everything is ok until when i reached to create portal.properties file inside example-hook/docroot/WEB-INF/src depend on its example with the following content: login.events.pre=com.liferay.sample.hook.LoginAction
and editing liferay-hook.xml inside example-hook/docroot/WEB-INF and add the following line above <custom-jsp-dir>:
<portal-properties>portal.properties</portal-properties>, and when i deploy the project then , it appears the following exception :
13:01:05,816 ERROR [pool-2-thread-1][HookHotDeployListener:1526] Unable to read portal.properties
com.germinus.easyconf.ConfigurationNotFoundException: Error reading configuration for portal: The base properties file was not found
at com.liferay.portal.configuration.easyconf.ClassLoaderComponentConfiguration.getProperties(ClassLoaderComponentConfiguration.java:81)
at com.liferay.portal.configuration.ConfigurationImpl.getComponentProperties(ConfigurationImpl.java:402)
at com.liferay.portal.configuration.ConfigurationImpl.printSources(ConfigurationImpl.java:417)
at com.liferay.portal.configuration.ConfigurationImpl.<init>(ConfigurationImpl.java:77)
at com.liferay.portal.configuration.ConfigurationImpl.<init>(ConfigurationImpl.java:54)
at com.liferay.portal.configuration.ConfigurationFactoryImpl.getConfiguration(ConfigurationFactoryImpl.java:28)
at com.liferay.portal.kernel.configuration.ConfigurationFactoryUtil.getConfiguration(ConfigurationFactoryUtil.java:27)
at com.liferay.portal.deploy.hot.HookHotDeployListener.initPortalProperties(HookHotDeployListener.java:1522)
at com.liferay.portal.deploy.hot.HookHotDeployListener.doInvokeDeploy(HookHotDeployListener.java:563)
at com.liferay.portal.deploy.hot.HookHotDeployListener.invokeDeploy(HookHotDeployListener.java:273)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:188)
at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:151)
at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:141)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.flushInits(PortalLifecycleUtil.java:48)
at com.liferay.portal.servlet.MainServlet.initPlugins(MainServlet.java:858)
at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:366)
at javax.servlet.GenericServlet.init(GenericServlet.java:160)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
How can i solve this exception?
Thanks Mr. Milen
I am applying your suggestion and everything is ok until when i reached to create portal.properties file inside example-hook/docroot/WEB-INF/src depend on its example with the following content: login.events.pre=com.liferay.sample.hook.LoginAction
and editing liferay-hook.xml inside example-hook/docroot/WEB-INF and add the following line above <custom-jsp-dir>:
<portal-properties>portal.properties</portal-properties>, and when i deploy the project then , it appears the following exception :
13:01:05,816 ERROR [pool-2-thread-1][HookHotDeployListener:1526] Unable to read portal.properties
com.germinus.easyconf.ConfigurationNotFoundException: Error reading configuration for portal: The base properties file was not found
at com.liferay.portal.configuration.easyconf.ClassLoaderComponentConfiguration.getProperties(ClassLoaderComponentConfiguration.java:81)
at com.liferay.portal.configuration.ConfigurationImpl.getComponentProperties(ConfigurationImpl.java:402)
at com.liferay.portal.configuration.ConfigurationImpl.printSources(ConfigurationImpl.java:417)
at com.liferay.portal.configuration.ConfigurationImpl.<init>(ConfigurationImpl.java:77)
at com.liferay.portal.configuration.ConfigurationImpl.<init>(ConfigurationImpl.java:54)
at com.liferay.portal.configuration.ConfigurationFactoryImpl.getConfiguration(ConfigurationFactoryImpl.java:28)
at com.liferay.portal.kernel.configuration.ConfigurationFactoryUtil.getConfiguration(ConfigurationFactoryUtil.java:27)
at com.liferay.portal.deploy.hot.HookHotDeployListener.initPortalProperties(HookHotDeployListener.java:1522)
at com.liferay.portal.deploy.hot.HookHotDeployListener.doInvokeDeploy(HookHotDeployListener.java:563)
at com.liferay.portal.deploy.hot.HookHotDeployListener.invokeDeploy(HookHotDeployListener.java:273)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:188)
at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:151)
at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:141)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.flushInits(PortalLifecycleUtil.java:48)
at com.liferay.portal.servlet.MainServlet.initPlugins(MainServlet.java:858)
at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:366)
at javax.servlet.GenericServlet.init(GenericServlet.java:160)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
How can i solve this exception?
Thanks Mr. Milen
Milen Dyankov, modificado hace 11 años.
RE: portal-ext.properties
Expert Mensajes: 310 Fecha de incorporación: 30/10/12 Mensajes recientes
Well it seems the portal can not find your portal.properties file. Can you check whether it is actually in the WAR file? Also double check you don't have a typo in the file name and/or inside the liferay-hook.xml file. For example on Windows one common issue is portal.properties file getting saved as portal.properties.txt
Hitoshi Ozawa, modificado hace 11 años.
RE: portal-ext.properties
Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
Milen, he created an ext plugin. He shouldn't have portal.properties file in his ext plugin. It seems like he's creating a mess.
Milen Dyankov, modificado hace 11 años.
RE: portal-ext.properties
Expert Mensajes: 310 Fecha de incorporación: 30/10/12 Mensajes recientes
Hitoshi, he was in the beginning. Now, as suggested, he is creating a hook:
Or at least this is how I understand the above statement!
when i reached to create portal.properties file inside example-hook/docroot/WEB-INF/src
Or at least this is how I understand the above statement!
Hitoshi Ozawa, modificado hace 11 años.
RE: portal-ext.properties
Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recienteshe was in the beginning. Now, as suggested, he is creating a hook:
Sorry, missed his last post. I'm going to go to bed. :-)
Haythem Al Shaikh Ahmed, modificado hace 11 años.
RE: portal-ext.properties
New Member Mensajes: 20 Fecha de incorporación: 9/12/12 Mensajes recientes
Thanks Mr. Milen,
you understand me and i'll check about what you say.
you understand me and i'll check about what you say.
Haythem Al Shaikh Ahmed, modificado hace 11 años.
RE: portal-ext.properties
New Member Mensajes: 20 Fecha de incorporación: 9/12/12 Mensajes recientes
First, Happy new Year and best wishes for you
I do double checked of the portal.properties file; there's in war file and lifray-hook.xml file has the exact name of portal.properties file.
what can i do in this case?
I do double checked of the portal.properties file; there's in war file and lifray-hook.xml file has the exact name of portal.properties file.
what can i do in this case?
Hitoshi Ozawa, modificado hace 11 años.
RE: portal-ext.properties
Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
You don't need to modify portal-ext.properties.
Like Sampsa replied, just create a hook. Following page provides information on hook.
http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/overriding-a-j-4
Like Sampsa replied, just create a hook. Following page provides information on hook.
http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/overriding-a-j-4
Haythem Al Shaikh Ahmed, modificado hace 11 años.
RE: portal-ext.properties
New Member Mensajes: 20 Fecha de incorporación: 9/12/12 Mensajes recientes
Thanks Mr. Hitoshi Ozawa
you have the same Sampsa's replied, and i replied on Mr. Sampsa, You can read it.
Thanks again,
you have the same Sampsa's replied, and i replied on Mr. Sampsa, You can read it.
Thanks again,