« 返回到 Development (Legacy)

Fast Portal Development With Tomcat

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 Tomcat Bundle

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!

0 附件
64979 查看
平均 (1 投票)
满分为 5,平均得分为 5.0。
评论
讨论主题回复 作者 日期
how to see the changes applied..whether I have... Supriya Kare 2013年8月11日 下午10:02

how to see the changes applied..whether I have to start tomcat or not..
which url to use to see the changes applied in the browser..
在 13-8-11 下午10:02 发帖。