« Voltar para Sample Portlets

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".

Similar articles #

Spring-Hibernate-DWR

0 Anexos
53768 Visualizações
Média (4 Votos)
A média da avaliação é 1.5 estrelas de 5.
Comentários
Respostas do tópico Autor Data
nao tem tutorial? ricardo wolosker 10 de Janeiro de 2012 12:47

nao tem tutorial?
Postado em 10/01/12 12:47.