liferay

ERROR: application/pdf is not a supported mime type [duplicate]

安稳与你 提交于 2019-11-28 14:03:41
This question is an exact duplicate of: File is not downloading from server 3 answers I am using Struts2 and Liferay for developing an application. My struts.xml is as follows: <action name="download" class="com.stp.portal.view.DownloadAction"> <result name="success" type="stream"> <param name="contentType">application/pdf</param> <param name="inputName">fileInputStream</param> <param name="contentDisposition">attachment;filename="abc.pdf"</param> <param name="bufferSize">1024</param> </result> </action> I basically want to download a pdf file from the server. But I get the following error: 10

PKIX path building failed in Eclipse

一笑奈何 提交于 2019-11-28 12:19:17
i'm working with Liferay and i'm using eclipse, and running a client/server model, using an encrypted socket (SSL). Currently, my application is running the client/server connection ok when I run the application in batch mode but when i try to start the server in Eclipse the application is giving me error javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) I

Liferay input-date format

99封情书 提交于 2019-11-28 11:39:48
问题 I am using Liferay 6.2 and want to use a liferay-ui:input-date field. Field itself is working fine. However i want to change the displayed date Format from mm/dd/yyyy to dd.mm.yyyy But how to do this? I cant see any attibutes to set this... <liferay-ui:input-date firstDayOfWeek="1" yearValue="<%=calendar.get(calendar.YEAR)%>" monthValue="<%=calendar.get(calendar.MONTH)%>" dayValue="<%=calendar.get(calendar.DAY_OF_MONTH)%>" dayParam="dateFrom-day" monthParam="dateFrom-month" yearParam=

Serve PDF in Spring Portlet MVC Architecture - Liferay 6.0.6

自作多情 提交于 2019-11-28 08:50:29
I was looking for a way to send a PDF (direct display) file to the browser through Liferay Portal. Found many solutions - the most popular one being writing a Servlet that does the job. I've read about Portlet Resource Serving in JSR 286 Specification, can someone please elaborate on that for Spring 3.0 Portlet MVC? <servlet> <display-name>DownloadServlet</display-name> <servlet-name>DownloadServlet</servlet-name> <servlet-class>com.liferay.portal.pdf.DownloadServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>DownloadServlet</servlet-name> <url-pattern>/DownloadServlet/*</url

Get the current user Liferay using a simple Java code

走远了吗. 提交于 2019-11-28 08:29:05
I'm working with : Liferay 6.0.6 with JBoss 5.1 and Struts2 . My question is, how to get the current user in Liferay once logged in, using a Java code. In your doView/processAction method do following User user = (User) request.getAttribute(WebKeys.USER); or use the ThemeDisplay object. It contains another information like companyId, groupId, ... ThemeDisplay td =(ThemeDisplay)request.getAttribute(WebKeys.THEME_DISPLAY); User user = td.getUser(); Classes ThemeDisplay, User nad WebKeys are part of portal-service.jar. If you need just some id to identify current user you can also use String

How to deploy portlets to Liferay?

时光总嘲笑我的痴心妄想 提交于 2019-11-28 08:27:28
I have faced problems in trying to install new portlets to Liferay running on Glassfish domain. I figured out the flow very lately and want to share it with others also. So, please read the answer and hope this helps someone :) (Pre requisites for the problem is that I knew that adding projects running on Glassfish is done with a autodeploy folder, but making them visible on Liferay was another story.) So, you make first a .war file let's say a portlet of name your_file.war. You wanna have it running on a glassfish domain under Liferay portal. Steps to success: 1) Navigate to Control Panel ->

How do I use autologin in liferay?

纵然是瞬间 提交于 2019-11-28 05:33:44
I want to login my users automatically from our application. I know liferay has an auto login feature, but I don't know how to use it. I didn't find much valuable information on the web. What do I need to do to make autologin work? I want to login a user automaticaly when he clicks a link, without him having to enter name and password. The name and password is saved on our application database. I believe the OP has no use for an answer now. Nonetheless, this deserves a comprehensive answer. In fact, I am surprised that it does not have one yet. First of all, this is a bad idea: such an

How to create a top-level servlet in liferay

橙三吉。 提交于 2019-11-28 03:39:18
问题 I wanted to create a servlet in liferay that is listening to a URL such as http://localhost:8080/my-servlet I tried to add it to a portlet but the I have the URL http://localhost:8080/my-portlet/my-servlet I tried to add my servlet description to the web.xml of ext-web, but no luck. Is there any way to add such a servlet ? 回答1: Liferay is also "Servlet"-Application - but a very-very big one. And Liferay need some servlet container like tomcat, jetty, jboss etc. However, you can simple create

How is the Tomcat temp directory location defined?

我怕爱的太早我们不能终老 提交于 2019-11-28 03:35:44
问题 I am running Tomcat bundled with Liferay5.2.3 and use Eclipse 3.5 (Galileo) as my IDE. I set up my Tomcat server in Eclipse as per this blog entry: http://www.jroller.com/holy/entry/developing_portlets_for_liferay_in. If I start Tomcat via the Eclipse server config, Liferay/Tomcat uses my C:\Documents and Settings\user\Local Settings\Temp\ directory. However, if I start Tomcat directly using the startup.bat script, Liferay/Tomcat uses the Tomcat temp directory. I can't figure out if Eclipse,

Authentication and authorization in REST Services with Liferay

谁说我不能喝 提交于 2019-11-28 01:31:15
问题 We are building some services that will be exposed through a RESTful API. Primary customers of this API are Liferay portlets using Angular JS, meaning there are direct calls from client-side (Angular) to our services. So far we have designed an authentication and authorization mechanism to assure that we can identify which logged user (Liferay) is requesting our API . PS.: note that although we are using Liferay, it could be any other Java based application instead. What we have designed is: