« Sample Portlets に戻る

Sample Spring Portlet

タグ: liferay portlet

This article will show you how to deploy the sample spring portlets in tomcat.

Configure your files #

The build.properties file has a parameter where you list the wars for deployment. Overwrite it by creating a build.[your computer user name here].properties (eg. build.jerry.properties) and adding this param:

 deploy.specific.wars=sample-spring-portlet.war

In a command prompt, goto your portlets folder (eg. \trunk\portlets\) and run this ant command:

 ant war-sample-spring-portlet

See your Spring Sample Portlets #

I recommend that you restart your tomcat instance. If it is not started, start up tomcat. Log in with a user that can add portlets, I use the default omniadmin, test@liferay.com/test. Select "add portlets" and goto the Test category. Within the test category, there will now be a Spring subcategory. Select it and you'll see the sample portlets. Add one or more to the page.

Explained #

The sample Spring portlets actually come from the Spring website (also noted in the \portlets\build.xml file). http://opensource.atlassian.com/confluence/spring/display/JSR168/Home

When you run "ant war-sample-spring-portlet", it combines a folder called "sample-spring-portlet.war.ext" with "sample-spring-portlet.war".

Troubleshooting #

If you run into errors, make sure you deploy from the "\portals\" folder with this command, "ant war-sample-spring-portlet".

Similar articles #

Spring-Hibernate-DWR

0 添付ファイル
53749 参照数
平均 (4 投票)
平均評価は1.5星中の5です。
コメント