This wiki does not contain official documentation and is currently deprecated and read only. Please try reading the documentation on the Liferay Developer Network, the new site dedicated to Liferay documentation. DISCOVER Build your web site, collaborate with your colleagues, manage your content, and more. DEVELOP Build applications that run inside Liferay, extend the features provided out of the box with Liferay's APIs. DISTRIBUTE Let the world know about your app by publishing it in Liferay's marketplace. PARTICIPATE Become a part of Liferay's community, meet other Liferay users, and get involved in the open source project. Sample Spring 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".