liferay

Ant 编译出现:Error starting modern compiler

白昼怎懂夜的黑 提交于 2019-11-27 14:00:34
我通过ant,执行start的时候就出现下面问题,,我用的是ant 1.7.0,jikes1.22,jdk1.6.1,为什么出下以下问题,谁能来救救我, Buildfile: D:\liferay\portal\build.xml start: compile: compile: [javac] Compiling 232 source files to D:\liferay\portal\portal-kernel\classes BUILD FAILED D:\liferay\portal\build.xml:15: The following error occurred while executing this line: D:\liferay\portal\build.xml:230: The following error occurred while executing this line: D:\liferay\portal\portal-kernel\build.xml:23: Error starting modern compiler Total time: 18 seconds ----------------------------------------- 我也遇到过这个问题,修改下面的就可解决问题 在这个文件中build.properties

Liferay开发学习Part4:portlet工程结构

我的未来我决定 提交于 2019-11-27 14:00:24
src:源代码包 web.xml:和普通的Web工程的web.xml一样 build.xml:ant的构建文件,不需要修改继承自SDK portlet.xml:portlet定义的描述文件,这里定义了portlet的名称、初始化参数、模式类型、portlet相关信息、权限等;此文件中可以看到view-template对应的XXX.jsp,当我们在liferay里面添加portlet后,看到的页面内容就是XXX.jsp的内容 liferay-portlet.xml:定义Portlet默认可用的用户组、默认模板、是否支持多个实例等。这个文件中的 portlet-name 必须匹配 portlet.xml 中的 portlet- name。 liferay-display.xml:描述portlet所属类别 来源: oschina 链接: https://my.oschina.net/u/589482/blog/104936

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

假装没事ソ 提交于 2019-11-27 08:08:57
问题 This question already has answers here : File is not downloading from server (3 answers) Closed 6 years ago . 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=

Passing array from .jsp to javascript function

雨燕双飞 提交于 2019-11-27 07:10:09
问题 I have a Liferay portlet where I pass a String array from action phase to render phase in my .jsp file. I am able to access the array and iterate through it like this: <c:forEach var="item" items="${arrayItems}"> <p>${item}</p> </c:forEach> This is just to check that passing the data works fine... However, I would like to pass this whole array to my javascript function (that handles rendering the data to canvas). Any idea how to do this? So far, I have tried the following: <% String[] items;

How do I use autologin in liferay?

杀马特。学长 韩版系。学妹 提交于 2019-11-27 05:34:24
问题 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. 回答1: I believe the OP has no use for an answer now. Nonetheless, this deserves a comprehensive

respond to http request with json object in portlet

谁说胖子不能爱 提交于 2019-11-27 05:18:38
I am a beginner in liferay portlet development and I am developing a portlet that receives a http get request, processes some information and than it has to return a json object. My problem is that my portlet sends a whole html page instead of just the json object. This is my code: HttpServletResponse servletResponse = PortalUtil.getHttpServletResponse((renderResponse)); servletResponse.setHeader("Content-type", "application/json"); servletResponse.setCharacterEncoding("application/json"); PrintWriter out = servletResponse.getWriter(); out.write(EntityUtils.toString(responseEntity)); out.flush

Liferay: How to configure Liferay Portal

给你一囗甜甜゛ 提交于 2019-11-27 04:06:10
问题 How to configure or to override Liferay portal properties with portal.properties ? 回答1: Liferay properties is powerful instrument that allows us to configure Portal behaviour without coding of hooks-, ext- and theme-plugin. By new requirement we proof at first for possibility to solve this requirement with change of Liferay configuration. The default properties configuration can be found at Liferay source code: https://github.com/liferay/liferay-portal/blob/master/portal-impl/src/portal

Serve PDF in Spring Portlet MVC Architecture - Liferay 6.0.6

我们两清 提交于 2019-11-27 02:27:55
问题 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

Get the current user Liferay using a simple Java code

三世轮回 提交于 2019-11-27 02:13:36
问题 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. 回答1: 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

Liferay portal(三)新建Portlet

。_饼干妹妹 提交于 2019-11-27 00:43:10
新建Liferay工程的时候会发现可以选择:Portlet模式,Hook模式,Ext模式,Theme模式,Layout模式。分别作用:1.开发自定义的页面 2.开发核心功能 3.开发扩展功能 4.开发主题功能 5.开发布局功能。 一 Portlet工程的新建过程: 在Eclipse的Liferay视图中,new一个Liferay工程,选择portlet模式。 然后继续new一个Liferay Portlet类。建议选择默认选项。 1.接着会发现在docroot/WEB-INF/src目录下面会生成对应的portlet,一般新建的portlet是一个继承自MVCPortlet的类,MVCPortlet继承自GenericPortlet类。新建的Portlet类定义了几个重要的方法:processAction()和doView()等等。这些方法是用来响应jsp页面等请求的处理。 2.portlet建好后也会在docroot/html/portlet/下面生成对应的jsp文件。 二 其余Hook,Ext,Theme,Layout工程新建方法:直接 在Eclipse的Liferay视图中,new一个Liferay工程,然后选择对应工程的功能。 来源: oschina 链接: https://my.oschina.net/u/1039458/blog/126291