alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Spring Framework example source code file (welcome-portlet.xml)

This example Spring Framework source code file (welcome-portlet.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Spring Framework tags/keywords

alternate, bean, calico, doctype, jsr-168-compliant, jsr-168-compliant, macaw, poodle, public, spring//dtd, utf-8, utf-8, wrapping, wrapping

The Spring Framework welcome-portlet.xml source code

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">

<beans>

	<!-- Wrapping a pre-existing JSR-168-compliant Portlet -->
	<bean id="welcomePortlet" class="org.springframework.web.portlet.mvc.PortletWrappingController">
		<property name="portletClass" value="org.springframework.samples.petportal.portlet.WelcomePortlet"/>
		<property name="useSharedPortletConfig" value="false"/>
		<property name="portletName" value="wrapped-welcome"/>
		<property name="initParameters">
			<props>
				<prop key="dog">Poodle
				<prop key="cat">Calico
				<prop key="bird">Macaw
			</props>
		</property>
	</bean>
	
	<!-- Alternate method to reuse portlet - simpler, but no ability to rename or set init parameters
	<bean id="simplePortletHandlerAdapter" class="org.springframework.web.portlet.handler.SimplePortletHandlerAdapter"/>
	<bean id="simplePortletPostProcessor" class="org.springframework.web.portlet.handler.SimplePortletPostProcessor"/>
	<bean id="welcomePortlet" class="org.springframework.samples.petportal.portlet.WelcomePortlet"/>
	-->
	
	<bean id="portletModeHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeHandlerMapping">
		<property name="portletModeMap">
			<map>
				<entry key="view" value-ref="welcomePortlet"/>
			</map>
		</property>
	</bean>

</beans>

Other Spring Framework examples (source code examples)

Here is a short list of links related to this Spring Framework welcome-portlet.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.