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

Struts example source code file (actionContext-spring.xml)

This example Struts source code file (actionContext-spring.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 - Struts tags/keywords

bean//en, bean//en, doctype, doctype, public, spring//dtd, utf-8, utf-8, when, when

The Struts actionContext-spring.xml source code

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

<beans>
	<bean id="simple-action" class="com.opensymphony.xwork2.SimpleAction" singleton="false"/>

    <bean id="dependency-action" class="com.opensymphony.xwork2.SimpleAction" singleton="false">
        <property name="blah">injected
    </bean>

    <bean id="execute-interceptor" class="com.opensymphony.xwork2.spring.ExecuteInterceptor"/>

    <bean id="proxied-action" class="org.springframework.aop.framework.ProxyFactoryBean">
        <property name="singleton">false  
		<property name="proxyTargetClass">true
		<property name="interceptorNames">
			<list>
				<value>execute-interceptor
                <!-- When "singleton" is false, the target appears to be required here to 
                     ensure that the config works as it should -->
                <value>simple-action
			</list>
		</property>
	</bean>

    <bean id="auto-proxied-action" class="com.opensymphony.xwork2.SimpleAction" singleton="false"/>

    <bean id="xwork-actions-proxy-creator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
		<property name="proxyTargetClass">true
		<property name="interceptorNames">
			<list>
				<value>execute-interceptor
			</list>
		</property>
        <property name="beanNames">auto-proxied-action
    </bean>
    
    <bean id="springResult" class="com.opensymphony.xwork2.spring.SpringResult"
		init-method="initialize">
		<property name="stringParameter" value="my string"/>
	</bean>
</beans>

Other Struts examples (source code examples)

Here is a short list of links related to this Struts actionContext-spring.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.