Liferay6 开发 环境部署 Liferay6实例(8)

2019-04-22 21:53

Liferay 6 Development Documentation

database such as MySQL?

[Answer] Liferay6 supports difference database. What we need to do is add DB setting in project properties.

Can be found in “Preparation-> Create a new empty project->Add project properties ” in development guide.

3. [Question] How to compile portlet using Ant in Eclipse? (Not sure if this remains valid for Liferay 6.)

[Answer] Liferay6 support compile & deploy with Ant. Can be found in “Preparation-> Create a new empty project->Change the default build.xml for deployment” in development guide.

4. [Question] How to deploy portlet using Ant in Eclipse?

[Answer] refer to question 3.

5. [Question] How to configure Liferay for SSO such as CAS?

[Answer] Support. Page 247 in

6. [Question] What will be the general debugging and troubleshooting procedures?

[Answer] Just like other Java project debug in eclipse. Developer can start server in debug mode.

7. Appendix

1. Appendix: Dynamic Query example

File path: //

Modify ProductLocalServiceImpl.java to dynamic query. package com.accentrix.ecatalog.product.service.impl; import java.util.List; import com.accentrix.ecatalog.product.model.Product; import com.accentrix.ecatalog.product.service.base.ProductLocalServiceBaseImpl; import com.liferay.portal.kernel.dao.orm.DynamicQuery; import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; Liferay 6 Development Documentation

import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil; import com.liferay.portal.kernel.exception.SystemException; /**

* The implementation of the product local service. * @author XXX

* @see com.accentrix.ecatalog.product.service.base.ProductLocalServiceBaseImpl * @see com.accentrix.ecatalog.product.service.ProductLocalServiceUtil */

public class ProductLocalServiceImpl extends ProductLocalServiceBaseImpl { }

public int countByName(java.lang.String name) throws SystemException { }

// int count = productPersistence.countByName(name);

DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(Product.class); if (name != null && name.trim().length() > 0) { }

int n = (int) super.dynamicQueryCount(dynamicQuery); return n;

dynamicQuery.add(PropertyFactoryUtil.forName(\

public List findByName(String name, int start, int end) throws SystemException { }

// List list = productPersistence.findByName(name, start, end);

DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(Product.class); if (name != null && name.trim().length() > 0) { }

// .add(PropertyFactoryUtil.forName(\// .addOrder(OrderFactoryUtil.asc(\

List list = super.dynamicQuery(dynamicQuery, start, end); return list;

dynamicQuery.add(PropertyFactoryUtil.forName(\

2. Appendix: change browser icon

Just add a line code

Note:The head jsp of myliferayue project is top_head.jsp under ${TOMCAT_HOME}\\webapps\\ROOT\\html\\common\\themes.

3. Appendix: Add or remove column

Liferay 6 Development Documentation

If you need to add or remove column please modify product_service.xml, then re-run build.xml in this path:

/myliferay-ext/docroot/WEB-INF/ext-impl/src/com/accentrix/ecatalog/product

For more detail, please refer to product_service.xml

4. Appendix: Log4j configuration

a) Create a portal-log4-ext.xml file in

/myliferay-ext/docroot/WEB-INF/ext-impl/src/META-INF

b) Change the log level of hibernate from ERROR to INFO. For example: In portal-log4j.xml:

In portal-log4-ext.xml:

(portal-log4j.xml could be found in

${TOMCAT_HOME}\\webapps\\ROOT\\WEB-INF\\lib\\portal-impl.jar)

c) Copy file log4j.dtd to

/myliferay-ext/docroot/WEB-INF/ext-impl/src/META-INF.

5. Appendix: Oracle configuration

a) Copy Oracle jar file to tomcat path

File path: ${TOMCAT_HOME}/lib/ext/ojdbc6.jar

b) Modify properties file

File path: /myliferay-ext/docroot/WEB-INF/ext-impl/src/portal-ext.properties #oracle configuration jdbc.default.driverClassName=oracle.jdbc.driver.OracleDriver jdbc.default.url=jdbc:oracle:thin:@192.168.118.232:1521:HKDSE jdbc.default.username=liferay jdbc.default.password=123456 #only for the first DB create schema.run.enable=true


Liferay6 开发 环境部署 Liferay6实例(8).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:岗位手册-制单员(展厅)

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: