Liferay 6 Development Documentation
10. Edit ${TOMCAT_HOME}/bin/catalina.bat that Tomcat can reference the login module (should in line 140) rem ----- Execute The Requested Command --------------------------------------- set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx1024m -XX:MaxPermSize=128m -Dfile.encoding=UTF8 -Duser.timezone=GMT -Djava.security.auth.login.config=êTALINA_HOME%/conf/jaas.config 11. Delete contents ${TOMCAT_HOME}/webapps/ROOT directory. This undeploys the default Tomcat home page.
12. Unpack liferay-portal-6.0.5.war to ${TOMCAT_HOME}/webapps/ROOT. 13. Create and edit
${TOMCAT_HOME}/WEB-INF/classes/portal-ext.properties for JNDI jdbc.default.jndi.name=jdbc/LiferayPool 14. For supporting UTF-8 URI Encoding, edit ${TOMCAT_HOME}/conf/server.xml
15. Run Tomcat,point browser to http://localhost:8080. You should see the default Liferay home page.
3. Liferay 6 development environment setup
1. Eclipse 3.6 install
After you download eclipse-jee-helios-SR1-win32.zip, unzip it to your prefer folder or some places like c:\\java\\eclipse, double click eclipse.exe
Liferay 6 Development Documentation
you will start eclipse.
2. Change the encoding for you entire workspace
After start eclipse, go to Preferences>General>Workspace and select UTF-8 as the Text File Encoding. This should set the encoding for all the resources in your workspace. Any components you create from now on using the default encoding should all match.
3. Unzip the Liferay SDK to your prefer directory such as C:\\liferay.
Go to C:\\liferay\\liferay-plugins-sdk-6.0.5, create a file named
build.{username}.properties
({username} means the name of your computer)
4. Open build.{username}.properties, add the following content: app.server.dir=C:/liferay/liferay-portal-tomcat-6.0.5/liferay-portal-6.0.5/tomcat-6.0.26 ext.work.dir=C: /liferay/liferay-portal-tomcat-6.0.5 5. Download Liferay6 plugin SDKS
Run eclipse , click Help -> Install New Software -> Available Software Sites -> Add http://releases.liferay.com/tools/ide/eclipse/helios/stable
Click OK button
6. Checked the “Liferay Tools” site from the selection box tree(About 10 minutes)
Liferay 6 Development Documentation
7. Click next and then click Finish to begin the installing (About 15 minutes).
Eclipse will ask to restart when install completed, please restart it.
8. Installing Liferay6 plug-in SDK
Click Window -> Preferences -> Liferay,
a) Click “Configure installed Liferay Plugin SDKs”, then click “Add” button
Choose you Liferay SDK installed directory such as C:\\liferay\\liferay-plugins-sdk-6.0.5, click “OK” button b)
Click “Create a new Liferay runtime environment”, choose “Liferay v6.0 CE (Tomcat 6)”
Liferay 6 Development Documentation
Click next, finished the installing. c)
Click “Create a new Liferay server”
Click “Finish” button completed the installing.
Liferay 6 Development Documentation
4. Developing & Deploying Custom Portlet to Liferay 6
Create a new empty Liferay project
1. Create a new Liferay project
Click File -> New -> Other -> Liferay -> Liferay Plug-in Project, Click next,
Input your project name: myliferay
and click”Ext” as plug-in type, click finish.
Once you have created the project successfully, the following directories will auto created: