Spring MVC url-mapping - spring

I made a simple web application by Spring mvc.
I want to use these URL
/user
/user/{id}
/user/create
/user/edit/{id}
in web.xml
first case
<servlet-mapping>
<servlet-name>SpringMVC1</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
It works well.
but I can not read
http://localhost:8080/res/images/image.png - 404 error
in {my project path}/WebContent/res/images/logo.png
second case
<servlet-mapping>
<servlet-name>SpringMVC1</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
I can see image on http://localhost:8080/res/images/image.png
but http://localhost:8080/user/create - 404 error
What's wrong??

You need something like this in your XML:
<mvc:resources mapping="/res/**" location="/path/to/your/resources"/>
See 16.14.5. Configuring Serving of Resources

more detail explain..
in my spring configuration xml file
i append
<mvc:resources mapping="/res/**" location="/path/to/your/resources"/>
it have to append next..
append to root node - beans
xmlns:mvc="http://www.springframework.org/schema/mvc"
and append to xsi:schemaLocation
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
and append mvc:annotation-driven node.
<mvc:annotation-driven />
It is my spring configuration xml
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan base-package="com.test" />
<bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.JstlView" />
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
<mvc:annotation-driven />
<mvc:resources mapping="/res/**" location="/res/" />
</beans>
It works well.
Thanks Sean Patrick Floyd.

Related

Apache camel Spring Profiles

HI Is there any example for blog post for apache camel using spring profiles for different DB properties.
I'm trying like below
<beans:beans xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<camelContext id="Demo" xmlns="http://camel.apache.org/schema/spring">
<Db properties >
<beans:beans profile="dev">
<context:property-placeholder properties-ref="properties" ignore-unresolvable="true"/>
<util:properties id="properties" location="classpath:dev.properties"/>
<context:component-scan base-package="com.demo.environment" />
</beans:beans>
<beans:beans profile="test">
<context:property-placeholder properties-ref="properties" ignore-unresolvable="true"/>
<util:properties id="properties" location="classpath:test.properties"/>
<context:component-scan base-package="com.demo.environment" />
</beans:beans>
</beans:beans>
Its giving Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'bean'. One of '{"http://www.springframework.org/schema/beans":beans}' is expected.
Can any one help here, I'm using camel 2.17.3 version

SpringData and MongoDB configuration error : MongoTemplate

I am currently attempting an integration of mongodb to my spring application.
I have the initial mongodb environment setup on my machine, service startup, etc.
However on the application configuration in spring there is an error related to the mongoTemplate construction-arg
"wildcard is strict but no declaration found for element"
I've actually used the same xml outlay as described in the documents here, the same as some recent tutorials online, and as far as I can tell I have addded the correct namespace urls. So i am a bit lost at the moment as to what I am missing. Any help on this is most appreciated.
Here is a look at the xml configuration:
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mongo="http://www.springframework.org/schema/data/mongo"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo.xsd">
<!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->
<!-- Enables the Spring MVC #Controller programming model -->
<annotation-driven />
<!-- scanning comment root context of all components package directory-->
<context:component-scan base-package="com.demo" />
<!--Dispatcher servlet-->
<!-- Resolves views selected for rendering by #Controllers to .jsp resources in the /WEB-INF/views directory -->
<beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="prefix" value="/WEB-INF/view/" />
<beans:property name="suffix" value=".jsp" />
</beans:bean>
<!-- Configure to plugin JSON as request and response in method handler -->
<beans:bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter">
<beans:property name="messageConverters">
<beans:list>
<beans:ref bean="jsonMessageConverter"/>
</beans:list>
</beans:property>
</beans:bean>
<!-- Configure bean to convert JSON to POJO and vice versa -->
<beans:bean id="jsonMessageConverter" class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
</beans:bean>
<!-- mongo db config -->
<mongo:mongo host="localhost" port="27017" id="mongo" />
<mongo:repositories base-package="com.demo.football.repository" />
<beans:bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate">
<constructor-arg ref="mongo"/>
<constructor-arg name="databaseName" value="FootballManager"/>
</beans:bean>
</beans:beans>
Qualify the xsd names to match the spring version you're using.
Considering you're using Spring 4, the xshema name space will change to following.
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mongo="http://www.springframework.org/schema/data/mongo"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo-1.7.xsd">

Spring MVC: I set the default page but the spring always should me the configuration files do not find

I try run a basic Java EE Spring project on eclipse(jboss 7.1.1 server, Spring 3.1.2 released), but when it always print that the configuration file do not find but I Actually put the configuration file in right place. I do not configure the welcome-file, but mvc:view-controller instead.
this is the web.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee /web-app_3_0.xsd">
<display-name>springupload</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/web-application-config.xml</param-value>
</context-param>
<!-- Loads the Spring web application context -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value/>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Map all *.spring requests to the DispatcherServlet for handling -->
<servlet-mapping>
<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
This is the web-application-config.xml file
<?xml version="1.0" encoding="UTF-8"?>
<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-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<!-- Scans for application #Components to deploy -->
<context:component-scan base-package="com.pack" />
<!-- Imports the configurations of the different infrastructure systems of the application -->
<import resource="webmvc-config.xml" />
<!-- <import resource="webflow-config.xml" /> -->
<!-- <import resource="data-access-config.xml" /> -->
<bean class="org.springframework.web.multipart.commons.CommonsMultipartResolver" id="multipartResolver">
<property name="maxUploadSize" value="1000000"></property>
</bean>
</beans>
This is webmvc-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
<!-- Enables controllers mapped with #RequestMapping annotations, formatting annotations #NumberFormat #DateTimeFormat, and JSR 303 style validation -->
<mvc:annotation-driven/>
<mvc:resources mapping="/res/**" location="/, classpath:/META-INF/web-resources/" />
<mvc:view-controller path="/" view-name="hello"/>
<mvc:default-servlet-handler />
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" id="jspre">
<property name="prefix" value="/WEB-INF/"/>
<property name="suffix" value=".jsp"/>
</bean>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" id="htmlre">
<property name="prefix" value="/WEB-INF/"/>
<property name="suffix" value=".html"/>
</bean>
</beans>
The error you can see in the picture:
HTTP Status 404 - /springupload/WEB-INF/webmvc-config.xml
type Status report
message /springupload/WEB-INF/webmvc-config.xml
description The requested resource (/springupload/WEB-INF/webmvc-config.xml) is not available.
JBoss Web/7.0.13.Final
I really do not know why I configure the html and jsp page, while it should some configuration file as my start page?
Your configuration is not far from being OK.
One thing I notice is that the hello.html file is in your root WebContent folder. I suppose this is the view you want rendered when you access http://localhost:8080/springupload/ because of this line in the configuration:
<mvc:view-controller path="/" view-name="hello"/>
If this is so, then Spring is trying to resolve to /WEB-INF/hello.html because of the prefix and suffix on this viewResolver :
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" id="htmlre">
<property name="prefix" value="/WEB-INF/"/>
<property name="suffix" value=".html"/>
</bean>
However, you have two view resolvers with no order in them, and Spring is taking only the first one which resolves to /WEB-INF/hello.jsp, hence the 404 Not found
To wrap it up your solution is to move hello.html to /WEB-INF/ and to change your viewResolver configuration in webmvc-config.xml like so
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" id="jspre">
<property name="order" value="2" />
<property name="prefix" value="/WEB-INF/"/>
<property name="suffix" value=".jsp"/>
</bean>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" id="htmlre">
<property name="order" value="1" />
<property name="prefix" value="/WEB-INF/"/>
<property name="suffix" value=".html"/>
</bean>
Last, you're not supposed to access directly content in the http://localhost:8080/WEB-INF/* URL, so everything you try here will result in a 404 Not found.
change your configuration file name to [dispatcher servlet name]-servlet.xml
http://static.springsource.org/spring/docs/3.0.x/reference/mvc.html

Can't load property file for property-placeholder

my property file is under the following path:
src\main\resources\META-INF\app-config.properties
and my spring configuration files are under the path:
WebContent\WEB-INF
and when trying to load the property file as follows:
<context:property-placeholder
location="classpath:META-INF/app-config.properties" />
i am getting the exception:
java.io.FileNotFoundException: class path resource [META-INF/app-config.properties] cannot be opened because it does not exist
applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:cache="http://www.springframework.org/schema/cache"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:jms="http://www.springframework.org/schema/jms" xmlns:jpa="http://www.springframework.org/schema/data/jpa"
xmlns:lang="http://www.springframework.org/schema/lang" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:oxm="http://www.springframework.org/schema/oxm" xmlns:p="http://www.springframework.org/schema/p"
xmlns:task="http://www.springframework.org/schema/task" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.1.xsd
http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-3.0.xsd
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.1.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-3.1.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">
<import resource="application-Security-Context.xml" />
<import resource="application-DataAccess-Context.xml" />
<import resource="application-Service-Context.xml" />
<context:component-scan base-package="com.myapp" />
<!-- PERSISTENCE -->
<context:property-placeholder
location="classpath:META-INF/app-config.properties" />
<jee:jndi-lookup id="appDS" jndi-name="MyApp" expected-type="javax.sql.DataSource"/>
<bean id="persistenceUnitManager"
class="org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager">
<property name="defaultDataSource" ref="appDS" />
</bean>
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceUnitManager" ref="persistenceUnitManager" />
<property name="persistenceUnitName" value="MyApp" />
</bean>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager" />
</beans>
applicationContext is loaded in web.xml as follows:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
i am using ant to build my project, am i missing ant configuration or eclipse configuration for this issue ?
ant config:
<zipfileset dir="${basedir}/src/main/resources/META-INF" includes="app-config.properties" fullpath="WEB-INF/classes/META-INF/app-config.properties"/>
also i added the META-INF folder to the deployment assembly in eclipse.
please advise how to load this property file correctly.
Can u try <context:property-placeholder
location="classpath*:META-INF/app-config.properties" />
If this also fails then may be your src\main\resources is not under the classpath.
I think the problem is in your path defined for properties file.
Can you try the following one.
<context:property-placeholder location="classpath:/META-INF/app-config.properties" />
Hope this helps you.
Taking a bit of a guess here, as you say you are using eclipse, but not exactly when the exception occurs - from eclipse or the command line. If from within Eclipse, then you will need to align the Eclipse project settings with those Ant is using. Go under Project-Properties, but rather than the deployment assembly, go to the Java Build path and verify that all of your source inputs (both code and resources) are there. More importantly, verify that the output directories are set to the same ones Ant is using. Long shot, but worth a try!
Is the properties file actually in your compiled artifact? Can you show us a directory listing of your unzipped artifact so we can see if the file is present? Or are you running it right from Eclipse and the error comes there? If so, you need to adjust your Project Properties to include the directory and/or file.

How do I configure spring controller URLs to not have an extension?

My controllers are currently mapped to be something like http://example.com/fix.go and, of course, I think that's idiotic and want something nicer like http://example.com/fix or http://example.com/mmm/fix with no extension. When I try to configure this, however, I can't get it to work. I'm clearly missing a key part of understanding on the entire mapping. I'm using Spring 3.x, tomcat, and annotations for the controllers.
My web.xml is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<web-app
version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<servlet>
<servlet-name>BooBoo</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>BooBoo</servlet-name>
<url-pattern>*.*</url-pattern> <!-- was *.go when it worked -->
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
BooBoo-servlet.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan base-package="com.foofoo.booboo"/>
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
<property name="prefix" value="/jsp/"/>
<property name="suffix" value=".jsp"/>
</bean>
</beans>
And one of my controllers is configured as such:
#Controller
public class BangBangController extends BaseController {
// Used to be fix.go when it worked
#RequestMapping( value="fix", method=RequestMethod.GET )
public ModelAndView choose(
HttpSession session,
#RequestParam( value="fixId", required=false, defaultValue="-1" ) Integer fixId,
#RequestParam( value="forkId", required=false, defaultValue="-1" ) Integer forkId
)
throws Exception { ... }
}
I've tried changing the mapping in web.xml to /mmm/* expecting URLs like http://example.com/mmm/fix to work, but that too has not worked. I get "missing resource" errors when I enter what I think are the correct URLs in the browser.
What am I goofing up here? What critical piece of understanding do I lack? I've tried making the no extension thing work on another project at work, and couldn't get it to go there either. I'm obviously missing something.
The problem is your dispatcher servlet is matching anything with a "." in it.
Change it to
<url-pattern>/*</url-pattern>
However, that's also bad as you won't be able to serve static content.
What you really should do is this:
<url-pattern>/webapp/*</url-pattern>
Where "webapp" is some prefix. All of your URLs will need to be prefixed with it, but that allows you to still serve static content.
The answer was that I flubbed up the spring-servlet.xml file by not specifying that I was using the Spring MVC stuff. I appreciate Chris' help in diagnosing the issue. I needed confirmation that some of the things I tried (but failed because of this mistake) were correct.
I added
xmlns:mvc="http://www.springframework.org/schema/mvc"
and
<mvc:annotation-driven />
to that file, and boom, it started working. What leaves me scratching my head is, "How did it work without that?" Cuz it worked for *.go patterns.
Here's the resulting file in full:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan base-package="com.barbar.foofoo"/>
<!-- Enables the Spring MVC #Controller programming model -->
<mvc:annotation-driven />
<!--
Declare View Resolver: when view 'view_name' is called (from the Controller),
the file '/jsp/view_name.jsp' will be used.
-->
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
<property name="prefix" value="/jsp/"/>
<property name="suffix" value=".jsp"/>
</bean>
</beans>

Resources