Thursday, May 26, 2011

spring mvc portlet deployment to pluto container

Article: http://books.dzone.com/articles/spring-30-portlet-mvc-part-2


Download pluto-2.0.1-bundle and unzip


run startup.bat to start the pluto server


Open the browser and enter http://localhost:8080/pluto/portal in the address bar


Login with pluto/pluto


Download sample code
http://code.google.com/p/portletsinaction/downloads/detail?name=sample_BookCatalog.zip&can=2&q=

unzip the sample_BookCatalog.zip bundle

copy sample_BookCatalog.xml to pluto-2.0.1-bundle\pluto-2.0.1\conf\Catalina\localhost
<Context path="sample_BookCatalog" docBase="../PlutoDomain/sample_BookCatalog.war" crossContext="true"></Context>

Update web.xml with
<servlet>
<servlet-name>bookCatalog</servlet-name>
<servlet-class>org.apache.pluto.container.driver.PortletServlet</servlet-class>
<init-param>
<param-name>portlet-name</param-name>
<param-value>bookCatalog</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>bookCatalog</servlet-name>
<url-pattern>/PlutoInvoker/bookCatalog</url-pattern>
</servlet-mapping>




Move standard.jar and jstl.jar to pluto-2.0.1-bundle\pluto-2.0.1\lib



run ant script to build the sample_BookCatalog.war

deploy the war file to pluto-2.0.1-bundle\pluto-2.0.1\PlutoDomain directory



type http://localhost:8080/pluto/portal/Pluto%20Admin after loggin into pluto admin



In the Portlet Applications, select sample_BookCatalog application and then select bookCatalog portlet, click on "Add Portlet" button



go to http://localhost:8080/pluto/portal/About%20Apache%20Pluto



You should see "Book Catalog" portlet listing out the books



Hurray :)

No comments:

Post a Comment