留言板
Showing Custom Page of Portlet as Liferay start up
Ravi Kiran,修改在12 年前。
Showing Custom Page of Portlet as Liferay start up
Junior Member 帖子: 98 加入日期: 11-12-12 最近的帖子
Inside my Liferay Tomcat Bundle Web-apps folder , i have deployed a Liferay-Struts2 Portlet , and its working fine
My Portlet name is RaviPortlet and This is the path under it as shown
E:\liferaytomcat\liferay-portal-6.1.0-ce-b4\tomcat-7.0.22\webapps\RaviPortlet-portlet
I want to show this default Landing Page as CustomLogin.jsp under RaviPortlet-portlet. So inside portal-ext.properties file i have modified it to
default.landing.page.path=/RaviPortlet-portlet/CustomLogin.jrtup sp
But i am getting Error under Server Console Please tell me if this is correct ?? and if not how is that we show our cutom page on Liferay start up
My Portlet name is RaviPortlet and This is the path under it as shown
E:\liferaytomcat\liferay-portal-6.1.0-ce-b4\tomcat-7.0.22\webapps\RaviPortlet-portlet
I want to show this default Landing Page as CustomLogin.jsp under RaviPortlet-portlet. So inside portal-ext.properties file i have modified it to
default.landing.page.path=/RaviPortlet-portlet/CustomLogin.jrtup sp
But i am getting Error under Server Console Please tell me if this is correct ?? and if not how is that we show our cutom page on Liferay start up
Juhi Kumari,修改在12 年前。
RE: Showing Custom Page of Portlet as Liferay start up
Expert 帖子: 347 加入日期: 11-12-12 最近的帖子
Ravi Kiran,修改在12 年前。
RE: Showing Custom Page of Portlet as Liferay start up
Junior Member 帖子: 98 加入日期: 11-12-12 最近的帖子
Hi ,
Thank you very much .
As told , I have modified portal-ext.properties as shown
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost:3307/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=ravi
default.regular.theme.id=noir
auth.forward.by.last.path=true
default.landing.page.path=http://localhost:8086/web/guest/home/RaviPortlet
This is under web.xml file
<servlet-mapping>
<servlet-name>RaviPortlet Servlet</servlet-name>
<url-pattern>/RaviPortlet/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>CustomLogin.jsp</welcome-file>
</welcome-file-list>
But still i am not able to show the CustomPage.jsp for my Portlet on Liferay startup .
Please see the screen shot attached .
This is the URL shown by Liferay when i do any operation on my RaviPortlet Liferay Struts Portlet
http://localhost:8086/web/guest/home?p_auth=nd8Y05tv&p_p_id=RaviPortlet_WAR_RaviPortletportlet_INSTANCE_Y8xL3HRdbH8k&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&_RaviPortlet_WAR_RaviPortletportlet_INSTANCE_Y8xL3HRdbH8k_templateDir=template&_RaviPortlet_WAR_RaviPortletportlet_INSTANCE_Y8xL3HRdbH8k_theme=simple&_RaviPortlet_WAR_RaviPortletportlet_INSTANCE_Y8xL3HRdbH8k_dynamicAttributes=%7B%7D&_RaviPortlet_WAR_RaviPortletportlet_INSTANCE_Y8xL3HRdbH8k_struts.portlet.action=%2Fview%2Fview%2FhelloForm&_RaviPortlet_WAR_RaviPortletportlet_INSTANCE_Y8xL3HRdbH8k_struts.portlet.mode=view
So will this be correct ??
default.landing.page.path=http://localhost:8086/web/guest/home/RaviPortlet
Thank you very much .
As told , I have modified portal-ext.properties as shown
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost:3307/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=ravi
default.regular.theme.id=noir
auth.forward.by.last.path=true
default.landing.page.path=http://localhost:8086/web/guest/home/RaviPortlet
This is under web.xml file
<servlet-mapping>
<servlet-name>RaviPortlet Servlet</servlet-name>
<url-pattern>/RaviPortlet/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>CustomLogin.jsp</welcome-file>
</welcome-file-list>
But still i am not able to show the CustomPage.jsp for my Portlet on Liferay startup .
Please see the screen shot attached .
This is the URL shown by Liferay when i do any operation on my RaviPortlet Liferay Struts Portlet
http://localhost:8086/web/guest/home?p_auth=nd8Y05tv&p_p_id=RaviPortlet_WAR_RaviPortletportlet_INSTANCE_Y8xL3HRdbH8k&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&_RaviPortlet_WAR_RaviPortletportlet_INSTANCE_Y8xL3HRdbH8k_templateDir=template&_RaviPortlet_WAR_RaviPortletportlet_INSTANCE_Y8xL3HRdbH8k_theme=simple&_RaviPortlet_WAR_RaviPortletportlet_INSTANCE_Y8xL3HRdbH8k_dynamicAttributes=%7B%7D&_RaviPortlet_WAR_RaviPortletportlet_INSTANCE_Y8xL3HRdbH8k_struts.portlet.action=%2Fview%2Fview%2FhelloForm&_RaviPortlet_WAR_RaviPortletportlet_INSTANCE_Y8xL3HRdbH8k_struts.portlet.mode=view
So will this be correct ??
default.landing.page.path=http://localhost:8086/web/guest/home/RaviPortlet
Sandeep Nair,修改在12 年前。
RE: Showing Custom Page of Portlet as Liferay start up
Liferay Legend 帖子: 1744 加入日期: 08-11-6 最近的帖子
Hi,
I believe what you want is whenever someone hits http://localhost:8080 it should redirect to the page in which your ravi portlet is there which has login screen
Is my understanding correct
Regards,
Sandeep
I believe what you want is whenever someone hits http://localhost:8080 it should redirect to the page in which your ravi portlet is there which has login screen
Is my understanding correct
Regards,
Sandeep
Ravi Kiran,修改在12 年前。
RE: Showing Custom Page of Portlet as Liferay start up
Junior Member 帖子: 98 加入日期: 11-12-12 最近的帖子
Yes Sandeep , tahts what i need .
Sandeep Nair,修改在12 年前。
RE: Showing Custom Page of Portlet as Liferay start up
Liferay Legend 帖子: 1744 加入日期: 08-11-6 最近的帖子
Undo all the changes you have done
Suppose your portlet is on a page called http://localhost:/web/guest/test
Then login as administrator. Go to Portal settings or Settings based on version you have. There you would see option Home URL . In home url just give /web/guest/test (assumption is your sign in portlet is on this page) and not the full url.
Logout.
Hit http://localhost:8080 and you should be redirected to http://localhost:/web/guest/test
Regards,
Sandeep
Suppose your portlet is on a page called http://localhost:/web/guest/test
Then login as administrator. Go to Portal settings or Settings based on version you have. There you would see option Home URL . In home url just give /web/guest/test (assumption is your sign in portlet is on this page) and not the full url.
Logout.
Hit http://localhost:8080 and you should be redirected to http://localhost:/web/guest/test
Regards,
Sandeep
Ravi Kiran,修改在12 年前。
RE: Showing Custom Page of Portlet as Liferay start up
Junior Member 帖子: 98 加入日期: 11-12-12 最近的帖子
Sandeep , thank you very much .
what do you mean by this ??
"Suppose your portlet is on a page called http://localhost:/web/guest/test"
Because i have my Portlet named as RaviPortlet-Portlet under Tomcat Webapps and i dont understand the above .
Please help .
what do you mean by this ??
"Suppose your portlet is on a page called http://localhost:/web/guest/test"
Because i have my Portlet named as RaviPortlet-Portlet under Tomcat Webapps and i dont understand the above .
Please help .
Sandeep Nair,修改在12 年前。
RE: Showing Custom Page of Portlet as Liferay start up
Liferay Legend 帖子: 1744 加入日期: 08-11-6 最近的帖子
I am assuming you have a page called test or anything that you like in liferay. Note this is liferay page and not jsp page. Liferay page means the ones that you create using Add page option available in liferay. And then add your portlet to the page.
Regards
Sandeep
Regards
Sandeep
Ravi Kiran,修改在12 年前。
RE: Showing Custom Page of Portlet as Liferay start up
Junior Member 帖子: 98 加入日期: 11-12-12 最近的帖子
Sandeep , thank you very much .
I am not aware of the approach you have told ( that is adding a Portlet to a Page )
Right now by default there is only a Welcome page , i have added another page called as Kiran , but how can i add a Portlet to this page called as Kiran ??
Or please tell me is there any other approach of doing this than by using Liferay Control Panel .
Thank you .
I am not aware of the approach you have told ( that is adding a Portlet to a Page )
Right now by default there is only a Welcome page , i have added another page called as Kiran , but how can i add a Portlet to this page called as Kiran ??
Or please tell me is there any other approach of doing this than by using Liferay Control Panel .
Thank you .
Sandeep Nair,修改在12 年前。
RE: Showing Custom Page of Portlet as Liferay start up
Liferay Legend 帖子: 1744 加入日期: 08-11-6 最近的帖子
What is the url of the page called Kiran? And is your sign in portlet on this page?
Ravi Kiran,修改在12 年前。
RE: Showing Custom Page of Portlet as Liferay start up
Junior Member 帖子: 98 加入日期: 11-12-12 最近的帖子Sandeep Nair:
What is the url of the page called Kiran? And is your sign in portlet on this page?
Please refer to the screen shot here
http://imageshack.us/f/23/kiranh.png/
Sandeep Nair,修改在12 年前。
RE: Showing Custom Page of Portlet as Liferay start up
Liferay Legend 帖子: 1744 加入日期: 08-11-6 最近的帖子
My solution was if you had your sign in portlet on page other than the default web/guest/home then you can redirect user to your custom page. Just to give you idea go an put this url(/web/guest/kiran) in Home URL space given in Portal Settings of Control panel
Afters saving. Click on logout. Now type http://localhost:8080, it will automatically be redirected to http://localhost:8080/web/guest/kiran instead of http://localhost:8080/web/guest/home
Regards,
Sandeep
Afters saving. Click on logout. Now type http://localhost:8080, it will automatically be redirected to http://localhost:8080/web/guest/kiran instead of http://localhost:8080/web/guest/home
Regards,
Sandeep
Ravi Kiran,修改在12 年前。
RE: Showing Custom Page of Portlet as Liferay start up
Junior Member 帖子: 98 加入日期: 11-12-12 最近的帖子
Thanks Sandeep for the help , i will try .
One more question please , is it mandatory to use Liferay Control Panel for this ??
Cant we do it by settings in properties file .
Thank you .
One more question please , is it mandatory to use Liferay Control Panel for this ??
Cant we do it by settings in properties file .
Thank you .
Sandeep Nair,修改在12 年前。
RE: Showing Custom Page of Portlet as Liferay start up
Liferay Legend 帖子: 1744 加入日期: 08-11-6 最近的帖子
Properties which can be changed by UI or Control panel are always givne the first preference than the ones in property files. So suppose you have specified something in property file and by mistake you upade it from control panel, the control panel one is used. Even if you change the property again it wont reflect
Regards,
Sandeep
Regards,
Sandeep
Ravi Kiran,修改在12 年前。
RE: Showing Custom Page of Portlet as Liferay start up
Junior Member 帖子: 98 加入日期: 11-12-12 最近的帖子
Thank you Sandeep for your help .
When i googled on to the internet , i found that for this type of requirement we can use Hook concept .
For example inside portal.properties customlogin.action = com.ourclass.TestAction
Please let me know whether my understanding is correct or not ??
Thanks .
When i googled on to the internet , i found that for this type of requirement we can use Hook concept .
For example inside portal.properties customlogin.action = com.ourclass.TestAction
Please let me know whether my understanding is correct or not ??
Thanks .