liferay

Opening PDF file using window.open from server

我们两清 提交于 2019-12-02 09:18:59
I have a method which generates a PDF file and stores it in /temp folder. I am using tomcat. I want to open the PDF file. I have tried this using window.open method in the JavaScript. But on clicking the hyperlink it says the requested resource was not found. I store the PDF file in /temp folder using following line (of course the file gets generated and saved in the location): inputMap.put(TableProperties.PDF_PATH, "/temp/report.pdf"); Now in a JSP I try the following <tr> <td> <a href="" onclick="javascipt:window.open('/temp /report.pdf');" class="popup">Click to open.</a> </td> </tr> but

How to fix an error `Java heap space` when downloading large files (GB) using Liferay

风格不统一 提交于 2019-12-02 08:54:21
I am using this code to download an existing file from the server on Liferay (6.2) into a local pc: ` File file = getFile(diskImage.getImageType(), diskImage.getId()); HttpServletRequest httpReq = PortalUtil.getHttpServletRequest(request); HttpServletResponse httpResp = PortalUtil.getHttpServletResponse(response); httpResp.setContentType("application/octet-stream"); httpResp.setHeader("Content-Transfer-Encoding", "binary"); httpResp.setHeader("Content-Length", String.valueOf(file.length())); httpResp.setHeader("Content-Disposition", "attachment; filename=" + file.getName()); try (InputStream

IOException when I try to start Liferay after migration from HSQL to PostgreSQL

南笙酒味 提交于 2019-12-02 08:52:29
I converted native lportal DB from Hypersonic to PostgreSQL. Added portal-ext.properties files with my PostgreSQL configurations and added postgresql-42.1.1 to D:\files\liferay-ce-portal-7.0-ga3\tomcat-8.0.32\lib\ext # PostgreSQL # jdbc.default.driverClassName=org.postgresql.Driver jdbc.default.url=jdbc:postgresql://localhost:5432/test jdbc.default.username=postgres jdbc.default.password=root And when I'm starting my liferay it shows me an Exception. But If I remove portal-ext.properties it will work fine! What the problem?? 08:36:35,748 ERROR [Framework Event Dispatcher: Equinox Container:

Usage of PortalDelegateServlet in Liferay

这一生的挚爱 提交于 2019-12-02 08:17:47
问题 I'm trying to create a servlet which shares liferay session contents with my application.So I need to use PortalDelegateServlet .But I can not find in how to import this library to my project.I can not find any .jar files or something. How can I import liferay java library to my project? 回答1: PortalDelegateServlet is in portal-service.jar which is a required part of the Liferay container. If you grabbed a bundle (which in comment you mention the Tomcat bundle), then it is provided for you.

Where does the Liferay portal-ext.properties go?

蓝咒 提交于 2019-12-02 07:48:32
问题 Below is my folder hierarchy. Where does the portal-ext.properties go? C:\glassfish3\glassfish\domains\domain1\applications\liferay Thanks! 回答1: You can put it in WEB-INF/classes folder of your liferay application. Probably C:\glassfish3\glassfish\domains\domain1\applications\liferay\WEB-INF\classes. 回答2: If you want a more clean location you can put it into the main folder of liferay. e.g.: * C:\liferay-portal-6.1.1-ce-ga2* 来源: https://stackoverflow.com/questions/7490877/where-does-the

Liferay portlet: redirect to an other jsp page from javascript

拥有回忆 提交于 2019-12-02 06:30:38
问题 I want to redirect to an other jsp page in a liferay portlet from js. The idea that I found is using a renderurl. The best code that I found that can help me as a first step is this one: <a id="renderURLWithJS" href=""> This render URL link is created with Javascript</a> <aui:script> AUI().use('liferay-portlet-url', function(A) { var param="Hello new jsp"; var renderUrl1 = Liferay.PortletURL.createRenderURL(); renderUrl1.setWindowState("<%=LiferayWindowState.NORMAL.toString() %>"); renderUrl1

Usage of PortalDelegateServlet in Liferay

半腔热情 提交于 2019-12-02 06:21:33
I'm trying to create a servlet which shares liferay session contents with my application.So I need to use PortalDelegateServlet .But I can not find in how to import this library to my project.I can not find any .jar files or something. How can I import liferay java library to my project? PortalDelegateServlet is in portal-service.jar which is a required part of the Liferay container. If you grabbed a bundle (which in comment you mention the Tomcat bundle), then it is provided for you. All you should need to do is configure your web.xml : <servlet> <!-- http://issues.liferay.com/browse/LEP-2297

Sign Out link in the session inactivity pop up

蹲街弑〆低调 提交于 2019-12-02 03:43:55
问题 How can i add one Sign Out link in the session inactivity pop up in liferay? Currently we don't have any hyperlink in that pop-up .We are having only the warning messages. Please help me how to solve this as i'm new to liferay. Thanks, Sourav 回答1: Here's the way to solve it: You can look up the warning text itself in Liferay. You'll find it in the translation files (portal-impl/src/content/Language*.properties. One method is to add the HTML required just there (the key, as you'll easily find,

Liferay portlet: redirect to an other jsp page from javascript

梦想与她 提交于 2019-12-01 23:48:40
I want to redirect to an other jsp page in a liferay portlet from js. The idea that I found is using a renderurl. The best code that I found that can help me as a first step is this one: <a id="renderURLWithJS" href=""> This render URL link is created with Javascript</a> <aui:script> AUI().use('liferay-portlet-url', function(A) { var param="Hello new jsp"; var renderUrl1 = Liferay.PortletURL.createRenderURL(); renderUrl1.setWindowState("<%=LiferayWindowState.NORMAL.toString() %>"); renderUrl1.setParameter("param",param); renderUrl1.setParameter('mvcPath', 'display.jsp'); /* is this correct???*

Liferay 6.1 portlet worked incorrect in 5.2.3

社会主义新天地 提交于 2019-12-01 20:53:07
I have a portlet that worked fine on Liferay 6.1 portal but when I deploy it on Liferay 5.2.3 my configuration page did not even open. How should I make it work ? Prakash K Here is a nice authoritative answer to a very similar question. The portlets of newer versions are not designed to work on older installation of Liferay. Since they are compiled using the latest plugins-sdk and the also the different jars which have changed since the last version. So if you want the newer version portlet to work with any older version then you have to compile the portlet with an older version of Liferay