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

Spring Framework example source code file (image-servlet.xml)

This example Spring Framework source code file (image-servlet.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

configuration, configurer, freemarker, freemarker, jsp, simple, simple, uncomment, velocity, velocityengine, viewresolver, viewresolver, web-inf/views, web-inf/views

The Spring Framework image-servlet.xml source code

<?xml version="1.0" encoding="UTF-8"?>
<!--
  - DispatcherServlet application context for the image database.
  -->
<beans xmlns="http://www.springframework.org/schema/beans"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
		xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
				http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">

	<!-- Activates @Autowired for ImageController -->
	<context:annotation-config/>

	<!-- MultiActionController that defines user interface actions as separate methods -->
	<bean id="imageController" class="org.springframework.samples.imagedb.web.ImageController"/>

	<!-- MultipartResolver for parsing file uploads, implementation for Commons FileUpload -->
	<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"/>

	<!-- Configurer that sets up a shared VelocityEngine for Velocity views -->
	<bean id="velocityConfigurer" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer">
		<property name="resourceLoaderPath" value="WEB-INF/views/"/>
	</bean>

	<!-- Configurer that sets up a shared FreeMarker Configuration for FreeMarker views -->
	<bean id="freemarkerConfigurer" class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
		<property name="templateLoaderPath" value="WEB-INF/views/"/>
	</bean>

	<!-- Simple ViewResolver for Velocity, appending ".vm" to logical view names -->
	<bean id="viewResolver" class="org.springframework.web.servlet.view.velocity.VelocityViewResolver">
		<property name="suffix" value=".vm"/>
	</bean>

	<!-- Simple ViewResolver for FreeMarker, appending ".ftl" to logical view names. -->
	<!-- Uncomment this and comment out the above to switch to the FreeMarker view. -->
	<!--
	<bean id="viewResolver" class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver">
		<property name="suffix" value=".ftl"/>
	</bean>
	-->

	<!-- Simple ViewResolver for JSP, prepending "/WEB-INF/views" and appending ".jsp" to logical view names. -->
	<!-- Uncomment this and comment out the above to switch to the JSP view. -->
	<!--
	<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
		<property name="prefix" value="/WEB-INF/views/"/>
		<property name="suffix" value=".jsp"/>
	</bean>
	-->

</beans>

Other Spring Framework examples (source code examples)

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

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

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 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.