liferay

Install Liferay as Windows 2012R2 service

老子叫甜甜 提交于 2019-11-30 16:10:19
问题 I am a newbie on Liferay and furthermore 100% Windows infrastructure knowledge based. I installed Liferay 6.2 on my Windows 2012R2 server together with Java jdk-8u5 version. All is running perfect as long as I am logged in as user on the Server via remotedesktop having open the tomcat startup.bat window. What have I to do exactly to start Liferay and/or tomcat as service? Thanks in advance for your efforts. 回答1: Configuring liferay or tomcat to run as a service on a windows server doesn't

How to close a popup window in Liferay?

↘锁芯ラ 提交于 2019-11-30 16:09:32
I load the WebContent edit portlet on a Popup window using the following code: <liferay-ui:icon image="edit" label="true" message="news-edit-url" url="${oneNews.newsEditUrl}" /> editUrl: taglibEditURL = "javascript:Liferay.Util.openWindow({dialog: {width: 960}," + "id: '" + renderResponse.getNamespace() + "'," + "title: '" + LanguageUtil.format(request.getLocale(), "edit-x", HtmlUtil.escape(assetRenderer.getTitle(request.getLocale()))) + "'," + "uri:'" + HtmlUtil.escapeURL(editPortletURLString) + "'});"; When the content is saved or published, the portlet is loaded on the popup window. I want

Received fatal alert: handshake_failure

末鹿安然 提交于 2019-11-30 15:50:10
I'm trying to send push notifications to my device using javapns library in liferay . Here's the code: private void pushNotification(ActionRequest actionRequest, ActionResponse actionResponse) { try { System.out.println("Push"); Push.alert("Hello World!", "ck.p12", "PASSPHRASE", false, "TOKEN"); } catch (CommunicationException e) { System.out.println("CommunicationException"); e.printStackTrace(); } catch (KeystoreException e) { System.out.println("KeystoreException"); e.printStackTrace(); } } I'm getting this error when the pushNotification is called: ERROR [PushNotificationManager:450]

How to set a Cookie in Liferay portlet?

[亡魂溺海] 提交于 2019-11-30 15:22:36
问题 I am having problems of trying to set a session cookie(s) in Liferay 6.0 portlets . I want to be able to set a cookie to the client browser to store application key for the linkedin authentication, where it can be then retrieved by other portlets. I am able to read cookies by using a following: public void addLinkedInCV(ActionRequest request, ActionResponse response) throws PortalException, SystemException { HttpServletRequest convertReq = PortalUtil.getHttpServletRequest(request); Cookie[]

How to set a Cookie in Liferay portlet?

♀尐吖头ヾ 提交于 2019-11-30 13:47:43
I am having problems of trying to set a session cookie(s) in Liferay 6.0 portlets . I want to be able to set a cookie to the client browser to store application key for the linkedin authentication, where it can be then retrieved by other portlets. I am able to read cookies by using a following: public void addLinkedInCV(ActionRequest request, ActionResponse response) throws PortalException, SystemException { HttpServletRequest convertReq = PortalUtil.getHttpServletRequest(request); Cookie[] cookies = convertReq.getCookies(); ... } Here's my failed attempt to read one. @Override public void

How to set eclipse to ignore the “Classpath Dependency Validator Message” Warning

谁说胖子不能爱 提交于 2019-11-30 13:17:22
问题 I would like it to have no warnings in my eclipse projects, but I get this one warning: Classpath entry org.eclipse.jdt.USER_LIBRARY/Liferay 6.1 GA Plugin API will not be exported or published. Runtime ClassNotFoundExceptions may result. from warning type Classpath Dependency Validator Message . I understand what eclipse is trying to say to me, but that is wrong, the library exists at the server and it is not right to export this with my projects. However, I need to set this warning in

Testing for custom plugin portlet: BeanLocatorException and Transaction roll-back for services testing

寵の児 提交于 2019-11-30 12:30:51
问题 My Problems: I can test successfully for CRUD services operation. I was doing an insert on @Before [setUp()] and delete of same data on @After [tearDown()] but going forward I would need to support Transactions rather than writing code for insert and delete. I am successful in fetching single records of my entity but when I fire a search query or try to fetch more than one of my entities I get: com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator has not been set for servlet

Open portlet from other portlet

筅森魡賤 提交于 2019-11-30 09:55:23
问题 Is it possible to open pop up window from one portlet, that contains some other portlet ? <portlet:renderURL var="kategorijaSelectorURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>"> <portlet:param name="mvcPath" value="/html/kategorija/view.jsp" /> <portlet:param name="struts_action" value="/html/kategorija/view.jsp" /> <portlet:param name="tabs1" value="kategorije" /> <portlet:param name="redirect" value="<%=redirect1 %>" /> </portlet:renderURL> 回答1: yes you can. var url;

Programmatically get the url of a page in liferay

寵の児 提交于 2019-11-30 08:27:49
I want to create a link in a portlet so that I can navigate to a different page in the liferay portal. I order to do that I am looking for an API (can be liferay specific) that given a page name, would return it's url (it can be the friendlyURL as well). The API to access pages in Liferay is the LayoutService. However, page names are not unique in Liferay and furthermore they are internationalized. So you need some unique property for a page to retrieve its url, besides its name. If you really only have the page name, you can use LayoutLocalServiceUtil.getLayouts(...) to loop over all Layouts

How to set eclipse to ignore the “Classpath Dependency Validator Message” Warning

本秂侑毒 提交于 2019-11-30 07:04:27
I would like it to have no warnings in my eclipse projects, but I get this one warning: Classpath entry org.eclipse.jdt.USER_LIBRARY/Liferay 6.1 GA Plugin API will not be exported or published. Runtime ClassNotFoundExceptions may result. from warning type Classpath Dependency Validator Message . I understand what eclipse is trying to say to me, but that is wrong, the library exists at the server and it is not right to export this with my projects. However, I need to set this warning in eclipse to ignore, how can I do this? Remove it here: Preferences -> Validation -> Classpath Dependency