Liferay6
Development Documentation
Table of Contents
1. Preface 2
What's covered 2
Prerequisite software 2
Assumption 3
2. Liferay installation and configuration 3
Download 3
JDK 1.6 Installation 3
MySQL Installation 3
Tomcat 6 installation and configuration 4
3. Liferay 6 development environment setup 6
4. Developing & Deploying Custom Portlet to Liferay 6 10
Liferay extend structure 10
Create a new empty Liferay project 10
Create a new portlet 11
Compiling & Deploying portlet 15
5. Table Maintenance Portlet Development 15
6. FAQ(Frequent Asked Questions) 35
7. Appendix 36
mysql需要安装documentation
1. Preface
This guide was written as a quick reference to getting started developing on the Liferay Portal 6 platform (non-bundled) for Java developer step by step.
What's covered
The following list details all of the various parts of the documentation that are covered over the course of the tutorial.
Preparation, development environment setup
The basic portlet development & deployment.
Logic code with MySql
Prerequisite software
The following prerequisite software and environment setup is assumed. You should also be reasonably comfortable using the following technologies.
Java SDK 1.5+
Liferay Portal 6
Eclipse 3.6
Ant 1.7
Apache Tomcat 6.0.14
MySql
Assumption
MySQL is installed
2. Liferay installation and configuration
Download
Download Liferay 6 war & sdk file from website
War: sourceforge/projects/lportal/files/Liferay%20Portal/6.0.5/liferay-portal-6.0.5.war/download
Dependency file: sourceforge/projects/lportal/files/Liferay%20Portal/6.0.5/liferay-portal-dependencies-6.0.5.zip/download
SDK: www.liferay/downloads/
Tomcat 6: /i ()
Now we have 4 files:
apache-tomcat-6.0.20.zip
liferay-portal-6.0.5.war,
liferay-plugins-sdk-6.0.5.zip
liferay-portal-dependencies-6.0.5.zip
JDK 1.6 Installation
Refer to:
acle/technetwork/java/javase/documentation/install-windows-152927.html
MySQL Installation
Refer to:
sql/doc/refman/5.1/en/windows-install-wizard.html
Tomcat 6 installation and configuration
1. Unpack apache-tomcat-6.0.20.zip to your prefer directory such as C:\java\tomcat60.
From now on, we shall call this path as ${TOMCAT_HOME}.
Notice: we are using non-install version.
2. Create and edit ${TOMCAT_HOME}/conf/Catalina/l to set up the portal web application:
<Context path=""> </Context> |
3. Edit ${TOMCAT_HOME}/conf/catalina.properties:
common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/lib/ext/*.jar |
4. Make sure your database server is installed and is working. If it's installed in a different machine, make sure that it's accessible from the one where Liferay is being installed.
5. Make sure the JDBC driver for your database is accessible by Tomcat. We will use MySQL as database, please copy connector-java-{$version}-bin.jar to ${TOMCAT_HOME}/lib/ext
Download url:
sql/downloads/mirror.php?id=13520#mirrors
6. JNDI configure, edit ${TOMCAT_HOME}/conf/Catalina/l
<Context path=""> <Resource name="jdbc/LiferayPool" auth="Container" type="javax.sql.DataSource" driverClassName="sql.jdbc.Driver" url="jdbc:mysql://localhost/ecatalogue?useUnicode=true&characterEncoding=UTF-8" username="root" password="123456" maxActive="100" maxIdle="30" maxWait="10000" /> </Context> |
Be sure to enter the user name and password to your database in the appropriate fields above.
Notice:
1) You need to create a file name portal-ext.properties, the following steps will talk about this.
2) Copy jta.-bin.jar to
${TOMCAT_HOME}/lib/ext
7. Create a mail session bound to mail/MailSession. Edit ${TOMCAT_HOME}/conf/Catalina/l and configure a mail session
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论