Liferay Code Analysis and extension--User Service
Reprint please retain the author information:
Author: 88250
blog:http:/blog.csdn.net/dl88250
MSN Gmail qq:dl88250@gmail.com
Directory
Summary 1
Environment 1
Import Project 1
User Service Analysis 3
User Service Extension 3
Problem Description 4
Solution Analysis 4
Solution 1 4
Solution 2 4
Final Scenario 4
Step 4
Summary 8
Summary
See a few days liferay,
Original: http://www.huqiwen.com/2012/10/24/liferay-6-1-development-study-12-file-upload/
Liferay provides a complete file processing, starting from Liferay 6.1 in the processing of files, no longer distinguish between documents and pictures, unified as a file Media library. In the common Portlet plug-in project, if you want to upload files to the
Liferay has two types of services:
1) Internal ServicesLiferay core services, such as portal-impl.jar
2) External ServicesThat is, portal APIs, such as portal-kernel.jar and portal-service.jar
The liferay internal service is updated frequently. Pay special attention to the liferay version upgrade. The liferay external
Liferay is a complete portal solution, based on the Java EE application, using the EJB and JMS Technologies, the front interface part uses the Struts MVC framework, the XML-based portlet configuration file can be freely and dynamically extended, Web services are used to support the acquisition of some remote information, and the full-text search function is implemented using Lucene.The main features are as follows:1, provide a single login interface,
Having used to use velocity, I encountered a problem in Porting previous Turbine-based programs to liferay4.0rc, which had plagued me for many days. Today, I finally completely solved the problem, which is summarized as follows: 1. liferay uses COM. liferay. util. velocity. multipleresourceloader to load VM files. The setting of this loader is in COM. liferay. po
Today, my colleague asked me where the Liferay framework default resource file was obtained when Maven built theme, and I compared the process of using ant to compile the deployment theme and using MAVEN to compile the deployment theme, discovering that it was a completely different strategy when replicating the framework default resource file!
ANT replication Liferay Policy for default resource files:
As
Today, I migrated the liferay of the development server to the newly purchased server of the company. When I started liferay, the following error was reported:
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/49/FA/wKiom1Qg2-bBLl9AAAahhXgCIqI010.jpg "Title =" 1.png" alt = "wKiom1Qg2-bBLl9AAAahhXgCIqI010.jpg"/> View liferay's log reports an error as follows:
09:41:32, 171 info [localhost-startS
Environment Construction:Liferay-portal-tomcat-6.2-ce-ga4-20150416163831865.zip liferaytomcat ServerLiferay-ide-eclipse-windows-x64-2.2.4-ga5-201507230603.zip liferayide Development toolsLiferay-portal-sql-6.2-ce-ga4-20150416163831865.zip Liferay building a database statementLiferay-portal-src-6.2-ce-ga4-20150416163831865.zip Liferay Source PackageLiferay-plugins-sdk-6.2.zip
Liferay provides a very simple method of Web application integration and single point of login: IFRAME Portlet. IFRAME Portlet can be used to easily include an existing web application, and form post or get can be used for user login.
There is no problem with the liferay mechanism, and the implementation is also very clever. However, for many web application systems, after using the
Create a simple web project in myeclipse:
(1) create a class under SRC and inherit from genericportlet. The Code is as follows:
Package COM. portlet;
(2) Create Table. jsp and the display. jsp codes are as follows:
1. Table. jsp:
2. display. jsp:
(3) download the liferay-portal-tomcat-4.2.1.zip and decompress it to the F:/liferay/tomcat directory (this is what I did on my machine)
(4) To F:/
When we create Liferay applications (such as Portlet,theme) with Maven, we often have a version choice, as shown in the figure:
The default show's last version of Archetype is selected, at which point we can only display the latest version of archetype, if we use the latest version of archetype development application, then eventually when the application deployed to the lower version of the container ( For example, the
Today, my colleagues need to switch to maven in the Liferay service builder, because Maven 6.1 is already in the archetype, so I thought it was a simple question, and I know it's been hard for me 3 hours.
The previous steps are the same, creating a service-builder archetype, as shown in the following figure:
Then, when you run the command Liferay:build-service, the following problems always occur:
Info: Global Lib directory/c:/users/asus/.m2/rep
In Liferay7, the control layer in the Portlet is split into 3 parts:1.MVCActionCommand2.MVCRenderCommand3.MVCRecourceCommandAs for why to be torn out, before we write ActionURL, a JSP may have a lot of actionurl, is to write it in Mvcportlet class, when the code is large, not easy to manage, and the structure is not particularly clear.The following is a brief introduction to the use of Mvcactioncommand, with a simple small example say Hi to U portlet1. Build a common Mvc-portlet, previously thou
After the first login, liferay generates a default private homepage layout for the user. In earlier versions of liferay, you can configure the default group layout on the system administrator management interface. However, this function is not available in version 4.1, so by default, newly registered users first see the same private place content after login, these contents are provided by
Introduction:
Now let's discuss in the article to solve Question 3: What are the special measures for cache files that already exist and do not exist.
Analysis:
Now let's take a look at the processing method if the cached file already exists.:
Because we have already created a cache file, and its base name is$ CATALINA_TMPDIR/liferay/css/portal/6476841388170400461
650) this. width = 650; "src =" http://img1.51cto.com/attachment/201308/160623788.png
I. What is AuI?
The AuI framework in liferay, officially called alloy, is a UI superframework that provides continuous and simple APIs for establishing network applications in three aspects of the browser, including structure, style, and performance.
It integrates three design languages: HTML, CSS, and Java.
Accurately speaking, AuI is a liferay Extension Based on Yui to facilitate some practical applica
There are portlet.xml in the portlet, and we can all see the following code for security settings:
..
In fact, a lot of people including me have a question, is that some portlets even if not set
I went through the next Liferay-in-action book, and in the P154 corresponding to the 4.5 section "Programmitic Security," you can see that only when you use programmatic access control in your code (such as IsUserInRole ()), To read the
The code that
Release date:Updated on:
Affected Systems:Liferay, Inc. Liferay Portal 6.1.1Description:--------------------------------------------------------------------------------Bugtraq id: 56589
Liferay Portal is a complete Portal solution. It is based on J2EE applications and uses EJB and JMS technologies.
The Liferay Portal 6.1 CE GA2 (6.1.1) and other versions have
Today, I opened two liferay-portlet environments on the E drive. They were all downloaded and bound. A bundles (with tomcat in it) + plugins-sdk (with portlet-related configurations ). Every time there is a ready-made one, the Manager will give it to us and we can use it directly. Today we don't know why we can't. Once we deploy A portlet, we will say build. cannot find D: \ develop \ bundles \ tomcat-6.0.18 \ lib in xml. I don't know. I used to be ab
IntroducedLiferay provides several ways to define complex queries that are used to retrieve data from a database.Typically, in each service entity, you can easily meet basic data query operations by defining some ' finder ' methods.However, there are times when we may encounter some of the following finder queries that are not sufficient:
Overly complex queries, such as sub-queries
Some aggregation operations need to be implemented, such as Min, Max, AVG, etc.
Want a composite o
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.