liferay

【转】Liferay使用心得

穿精又带淫゛_ 提交于 2019-11-27 00:42:33
Liferay是一个出色的Java开源Portal产品,其中整合了很多当今流行的开源框架,也被不少人使用在实际项目中。最近刚结束了一个基于Liferay Portal的项目,总结下使用中的一些心得,希望对正在使用Liferay的朋友有些帮助。 一、安装 Liferay的安装十分容易,甚至都不能称其为安装,根据情况从Liferay官方网站下载合适的安装包(一般可以选择Tomcat的Bundle),解压后直接运行,它会使用自带的HSQL数据库,其中包括一些初始数据和演示数据。 实际使用时不能用HSQL,也不应该有演示数据,所以可以用Liferay站点提供的SQL来初始化数据库。Liferay-portal-sql的包比较大,只要用其中的几个SQL就行了,如果是全新安装,用create-minimal目录中适合自己数据库的那个SQL文件就可以了。 启动tomcat前,修改conf\Catalina\localhost中的ROOT.xml,启用新的数据源,Hibernate的Dialect系统会自动识别的。 二、Portal细节配置 Liferay的可配置性极强,可以通过两个部分来配置,一是portal-ext.properties文件,二是进入系统后用企业管理Portlet来配置。 要了解portal-ext有哪些可以配置的参数,可以打开portal-impl.jar中的portal

Liferay 6.2学习笔记(一)--开发环境安装配置

落爺英雄遲暮 提交于 2019-11-27 00:42:22
下载所需文件,包括: liferay-portal-tomcat-6.2.0、liferay-portal-src-6.2.0、liferay-plugins-sdk-6.2.0,解压缩到指定位置备用,下载地址 : http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.2.0%20GA1/ 。 安装Liferay的eclipse插件,在Eclipse Marketplace中搜索Liferay,点击install。 配置SDK,第一次new liferay project 需要配置sdk,点击configure,选择下载的 liferay-plugins-sdk-6.2.0解压缩目录。 配置portal runtime,点击new,选择tomcat7版本,点击下一步,Liferay bundle directory中选择下载的 liferay-portal-tomcat-6.2.0解压缩目录。 点击finish完成新建项目时,报了fail while installing liferay portlet 6.0 nullpointerexception的错误。参考: https://issues.liferay.com/browse/IDE-1176 找到解决办法,应该是sdk的版本问题,直接在 http:

编译liferay 6.0.6

亡梦爱人 提交于 2019-11-27 00:41:56
本文以tomcat 7.0.27和liferay 6.0.6为例,详细讲述如何从liferay 6.0.6源码编译出整套liferay 应用. 设BASE_DIR=D:\java为顶层目录, 将liferay 6.0.6源码包解压到$BASE_DIR, 将tomcat解压到$BASE_DIR\bundles\tomcat。即: SET "BASE_DIR=D:\java" SET "LIFERAY_SRC=%BASE_DIR%\liferay-portal-src-6.0.6" SET "CATALINA_HOME=%BASE_DIR%\bundles\tomcat\tomcat-7.0.27" SET "PATH=%CATALINA_HOME%\bin;%PATH%" 进入%LIFERAY_SRC%,打开命令行, 设置ANT_OPTS set "ANT_OPTS=-Xmx1024m -XX:MaxPermSize=256m" liferay源码是采用1.7或以上版本的ant工具构建,因此请安装ant,配置环境变量ANT_HOME,并将ant运行脚本放入环境变量PATH中. 整个liferay项目主要由portal-service, portal-impl, portal-web, util-java, util-bridges, util-taglib和tunnel

Liferay开发学习Part3:5种开发模式

纵饮孤独 提交于 2019-11-27 00:41:39
Liferay共有5种开发模式: portlet(portlet插件):其结构和内容和普通的WEB工程区别不大 portlet-ext(portlet扩展插件):不推荐 layout(布局):可定制布局 theme(主题):主题包,通过此模式提供的向导工具,为主题包开发大大提供便利 hook:重写覆盖liferay的默认页面,为开发提供一种不直接修改Liferay核心源码的情况下修改Liferay核心功能的方法。 来源: oschina 链接: https://my.oschina.net/u/589482/blog/104935

How to submit form using Ajax request in Liferay?

牧云@^-^@ 提交于 2019-11-26 19:38:02
问题 I am newbie in liferay portal. I have developed one portlet in liferay for demo. I used inter portlet communication in this example. What i am doing is:- I have one search portlet in which i am having one textfield for search. When i click on search button it fetches the data from the database and display that data using search-contained in another portlet. I used ProcessEvent and ActionEvent annotation for this project. Now what i want is when i click on the search button then the page

Accessing the user from a liferay portlet?

被刻印的时光 ゝ 提交于 2019-11-26 17:23:10
问题 I'm attempting to develop a portlet for liferay. How can I get access to the username and password (and other data liferay has) of the user that's currently logged in? I'd also like to be able to execute some code when users change their password. 回答1: You can get the User ID by calling getRemoteUser() in the PortletRequest object. This is defined by JSR-168 therefore it's cross-portal compatible. Once you have the ID you can fetch the additional informations by calling getUserById() (a

PortletURL to open another portlet in pop-up

ⅰ亾dé卋堺 提交于 2019-11-26 17:08:26
问题 I have a hook for create_account.jsp . In this jsp I have a javascript code where I try to open a portlet in an iframe pop-up or some pop-up from Liferay. The question is: How to give the portlet URL? How can I access it? In that portlet I only want to ask a question with YES or NO, and based on the user answer, redirect to some other page. 回答1: To create a URL, you can either use <portlet:renderURL> or <liferay-portlet:renderURL> <liferay-portlet:renderURL var="testPopupURL" portletName=

Eclipse集成Liferay

风格不统一 提交于 2019-11-26 15:10:00
官方下载地址: http://www.liferay.com/ 1、下载Eclipse压缩包:eclipse-jee-luna-SR2-win32-x86_64.zip 2、下载liferay插件包:liferay-ide-updatesite-2.2.2-ga3-201501300730.zip 3、下载Liferay SDK包:liferay-plugins-sdk-6.2-ce-ga4-20150416163831865.zip 4、下载Liferay Tomcat包:liferay-portal-tomcat-6.2-ce-ga4-20150416163831865.zip 5、分别解压Eclipse和Liferay SDK的zip包 6、打开Eclipse,点击 Help - > Install New Software 7、点击Add,输入Name:Liferay IDE。点击Archive选择 liferay-ide-updatesite-2.2.2-ga3-201501300730.zip 包 8、依次点击OK -> Seclet All -> Next 9、坐等安装 10、安装完毕后重启Eclipse 11、配置Liferay SDK,依次点Windows -> Preferences,搜索Liferay,点击Installed Plugin SDKs 12

Liferay6.1学习笔记(四)--整合CAS实现单点登录

匆匆过客 提交于 2019-11-26 15:09:45
转载: http://www.ibm.com/developerworks/cn/opensource/os-cn-liferay-cas/index.html Liferay 门户介绍 Liferay 是一个基于 J2EE 架构的完整的门户解决方案,使用了 EJB、JMS 等技术, 前台界面使用了 Struts MVC 框架、模板技术等一些开源的主流技术,基于 XML 的 portlet 配置文件可以自由地动态扩展, 使用了 Web Services 来支持一些远程信息的获取,使用 Lucene 实现全文检索功能。 主要特点: 采用最先进的技术 Java, EJB, JMS, SOAP, XML。 提供多种单点登陆接口,如 CAS,LDAP, OpenID,OpenSSO 等。 管理员能通过用户界面轻松管理用户,组,角色,并为不同的用户分配不同的权限范围和相应的功能。 用户可以根据需要定制个性化的页面布局和颜色风格。 可以在主流的 J2EE 应用服务器上运行,如 Tomcat,Weblogic,WebSphere 等商业或开源免费的服务器。 支持多种主流的数据库,如 Oracle,DB2, MySQL 等。 使用了第三方的开源项目,如 Velocity ,Hibernate, Lucene, Struts 等。 支持包括中文在内的多种语言。 目前最新的版本为 Liferay 6

在Tomcat 6.0.33上安装Liferay 6.1.0 CE的步骤

只愿长相守 提交于 2019-11-26 15:09:22
一、准备工作 下载 tomcat 6.0.33 , liferay 6.1.0 CE的 war文件包 、 源码包 、 SQL脚本包 以及 附加依赖包 。本例子采用Mysql数据库作为存储引擎,故请安装Mysql数据库并确保mysql服务已经启动。由于在使用liferay的过程中,可能需要发送邮件(比如用户注册时发送验证邮件),因此需要一台邮件服务器。为了简单起见,本例子在本机上安装了一个windows邮件服务器—— hmailserver (关于hmailserver的安装与配置,请参考相关文档). 二、安装与配置 1) 在D盘上建立一个liferay.home目录 cd d: mkdir java mkdir liferay-6.1-ce D:\java\liferay-6.1-ce 就是我们的liferay.home目录,我们用变量LIFERAY_HOME来表示。 2) 将tomcat-6.0.33压缩包解压到%LIFERAY_HOME%目录下,并将解压后的tomcat目录名改为tomcat-6.0.33。我们用变量TOMCAT_HOME表示%LIFERAY_HOME%\tomcat-6.0.33 3) 我们用变量TOMCAT_WEBAPPS表示%TOMCAT_HOME%\webapps\ROOT。 先清空%TOMCAT_WEBAPPS%目录下的所有内容,然后将liferay