
Fast Portal Development With Tomcat
Table of Contents [-]
Concept#
Before 4.3 RC1, if you wanted to edit your jsps without restarting or redeploying to tomcat, you had to edit jsps in the tomcat directory. Here you run into the mess of forgetting to port your changes back to your actual code and end up losing all your work if you happen to deploy before saving. Now there is another option to rapidly develop within Liferay. Starting with version 4.3 RC1, you could edit your JSPs directly in trunk for instant results without having to redeploy or restart tomcat.
Requirements#
- Liferay Portal 4.3. or later source code
- Ant 1.7
Recommended#
Setup#
Unzip the source code and tomcat bundles to their respective directories.
Source Code#
Specify your portal directory in app.server.%username%.properties
Example:
app.server.tomcat.portal.dir=C:/trunk/portal-web/docroot
Tomcat Bundle#
1. Delete the ROOT directory from ../tomcat/webapps/
2. Specify the docBase in ../tomcat/conf/Catalina/localhost/ROOT.xml within <Context />
Example:
<Context path="" crossContext="true" docBase="C:/trunk/portal-web/docroot">
Conclusion#
If your environment is setup correctly, you should be able to edit jsps within trunk/portal-web/ and see the changes appear with a simple browser or portlet reset. There is no more need to do 'ant deploy' or work directly within tomcat to achieve the same results!