Spring mvc: Controller Result resent to RequestMappingHandlerMapping - spring-mvc

I have an abstract Spring Controller class extended by various controllers.
Example method:
#Override
#RequestMapping(value = { "/", "" }, method = RequestMethod.GET)
public String getAllAsView(#RequestParam(required = false) boolean ajax,
Model m) {
String mapping = elementClass.getSimpleName();
m.addAttribute(mapping + "List", getAll());
return mapping + "All" + (ajax ? "Ajax" : "");
}
These are the relevant definitions in my view.xml:
<definition name="maintemplate" template="/WEB-INF/views/main_template.jsp">
<put-attribute name="top" value="/WEB-INF/views/header.jsp" />
<put-attribute name="side" value="/WEB-INF/views/menu.jsp" />
</definition>
<definition name="ajaxtemplate" template="/WEB-INF/views/ajax_template.jsp">
<put-attribute name="top" value="/WEB-INF/views/header.jsp" />
</definition>
<definition name="PersonAll" extends="maintemplate">
<put-attribute name="content" value="/WEB-INF/views/personlist.jsp" />
</definition>
<definition name="PersonAllAjax" template="ajaxtemplate">
<put-attribute name="content" value="/WEB-INF/views/personlist.jsp" />
</definition>
With the ajax parameter only the body content is to return.
Everything works fine without the ajax parameter.
But with the Ajax parameter the return string is used for a new Controller request.
This is the Log:
DEBUG: org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Looking up handler method for path /person/6
TRACE: org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod - Invoking [PersonController.getAsView] method with arguments [6, true, {}]
WARN : de.kreth.clubhelperbackend.aspects.DaoLoggerAspect - de.kreth.clubhelperbackend.dao.PersonDao.getById(6) ==> 6: M Kreth
TRACE: org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod - Method [getAsView] returned [PersonGetAjax]
DEBUG: org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Looking up handler method for path /person/ajaxtemplate
This is the servlet-context.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:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="de.kreth.clubhelperbackend" />
<mvc:annotation-driven>
<mvc:message-converters>
<bean
class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
<property name="objectMapper">
<bean
class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean">
<property name="dateFormat">
<bean class="java.text.SimpleDateFormat">
<constructor-arg type="java.lang.String"
value="dd/MM/yyyy HH:mm:ss.SSS Z"></constructor-arg>
</bean>
</property>
</bean>
</property>
</bean>
</mvc:message-converters>
</mvc:annotation-driven>
<mvc:resources mapping="/resources/**" location="/resources/" />
<bean
class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver" />
<bean class="org.springframework.web.servlet.view.tiles2.TilesViewResolver">
<property name="order" value="1" />
</bean>
<bean class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
<property name="definitions">
<list>
<value>/WEB-INF/views/**/views.xml</value>
</list>
</property>
</bean>
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="order" value="2" />
<property name="prefix" value="/WEB-INF/views/" />
<property name="suffix" value=".jsp" />
</bean>
I am stuck finding out what is happening here. I changed the template name and the new name was used for the request.
The problem came up, after I changed nearly all xml files in project. I inserted Doctype tag and changed schema definitions and stuff. Because that caused heavy problems I stepped back to a working version. Before that, the ajax parameter worked.
Ah - and I updated to java-version 1.6.
Any ideas why spring uses the templatename "ajaxtemplate" as a new request and sends it back to the controller?
Best regards
Markus

Stupid mistake: never programm past midnight:
<definition name="PersonAllAjax" template="ajaxtemplate">
<put-attribute name="content" value="/WEB-INF/views/personlist.jsp" />
</definition>
must be
<definition name="PersonAllAjax" extends="ajaxtemplate">
<put-attribute name="content" value="/WEB-INF/views/personlist.jsp" />
</definition>

Related

Spring MVC, Tiles 3, and Freemarker Integration

I have integrated the Freemarker into an existing spring MVC and Tiles 3 application and found that it couldn't read the tiles definition file. It directly reads the content tile, which is one among 3 tiles that configured in the tiles definition file, bypassing the tile definition file. How can I make it to read the tiles definition file? Here are my codes:
applicationContext.xml
<mvc:annotation-driven />
<mvc:resources mapping="/resources/**" location="/resources/" />
<bean id="viewResolver" class="org.springframework.web.servlet.view.tiles3.TilesViewResolver"/>
<bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
<property name="definitions">
<list>
<value>/WEB-INF/tile-defs/view.xml</value>
<value>/WEB-INF/tile-defs/survey.xml</value>
</list>
</property>
</bean>
<bean id="fmXmlEscape" class="freemarker.template.utility.XmlEscape"/>
<bean id="freemarkerConfig" class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
<property name="templateLoaderPath">
<value>/WEB-INF/views/</value>
</property>
<property name="freemarkerVariables">
<map>
<entry key="xml_escape" value-ref="fmXmlEscape"/>
</map>
</property>
<property name="freemarkerSettings">
<props>
<prop key="template_update_delay">3</prop>
</props>
</property>
</bean>
<bean id="freeMarkerViewResolver" class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver">
<property name="cache" value="true"/>
<property name="prefix" value=""/>
<property name="suffix" value=".ftl"/>
<property name="exposeSpringMacroHelpers" value="true"/>
<property name="exposeRequestAttributes" value="true"/>
<property name="exposeSessionAttributes" value="true"/>
</bean>
tiles-def.xml
<tiles-definitions>
<definition name="template"
template="/WEB-INF/views/main_template.ftl">
<put-attribute name="header"
value="/WEB-INF/views/tiles/header.ftl" />
<put-attribute name="footer"
value="/WEB-INF/views/tiles/footer.ftl" />
</definition>
<definition name="home" extends="template">
<put-attribute name="content" value="/WEB-INF/views/home.ftl" />
</definition>
main_template.ftl
<body>
<!-- Header -->
<tiles:insertAttribute name="header" />
<tiles:insertAttribute name="content" />
<!-- Footer Page -->
<tiles:insertAttribute name="footer" />
</body>
home.ftl
<#import "spring.ftl" as spring />
Hello world!
<P> The time on the server is ${serverTime}. </P>
<P> ${message}. </P>
header.ftl
<#import "spring.ftl" as spring />
This is header
I had the same issue. I solved it by adding this to the top of my ftl files
<#assign tiles=JspTaglibs["http://tiles.apache.org/tags-tiles"]>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
and using
<#tiles.insertAttribute name="header" />
to insert something from the tiles definition.

Issue tiles (Could not resolve view with name...)

I am working with Spring MVC. My application was ok before inserting tiles, now I keep receiving the error message as:
javax.servlet.ServletException: Could not resolve view with name '/sisStudent' in servlet with name 'mvc-dispatcher'
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1190)
org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:992)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:939)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
My tiles.xml is:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
"http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
<tiles-definitions>
<definition name="base.definition" template="/WEB-INF/jsp/layout.jsp">
<put-attribute name="title" value="" />
<put-attribute name="header" value="/WEB-INF/jsps/header.jsp" />
<put-attribute name="menu" value="/WEB-INF/jsps/menu.jsp" />
<put-attribute name="body" value="" />
<!-- put-attribute name="footer" value="/WEB-INF/jsps/footer.jsp" /> -->
</definition>
<definition name="sisStudent" extends="base.definition">
<put-attribute name="title" value="SIS Students" />
<put-attribute name="body" value="/WEB-INF/jsps/sisStudent.jsp" />
</definition>
</tiles-definitions>
My spring-servlet.xml is:
<beans xmlns="http://www.springframework.org/schema/beans"
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/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan base-package="au.edu.nsw.det.tls.tar.sis.controller" />
<!--
bean id="tilesViewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
property name="prefix"> <value>/WEB-INF/jsps/</value> </property>
<property name="suffix"> <value>.jsp</value> </property> <property
name="viewClass"> <value>
org.springframework.web.servlet.view.tiles3.TilesView</value>
</property> </bean>
-->
<!-- bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix">
<value>/WEB-INF/jsps/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean -->
<bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass">
<value> org.springframework.web.servlet.view.tiles3.TilesView</value>
</property>
</bean>
<bean id="tilesConfigurer"
class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
<property name="definitions">
<list>
<value>/WEB-INF/tiles.xml</value>
</list>
</property>
</bean>
</beans>
My controller is:
#Controller
// #RequestMapping("/studentSearch")
public class StudentSearchController {
#Autowired
StudentService studentService;
// #RequestMapping(value="/StudentSearchById", method = RequestMethod.GET)
// public ModelAndView searchById(#PathVariable Long studentId) {
#RequestMapping (value="/openStudentSearchScreen", method = RequestMethod.GET)
public ModelAndView openCourseSearchScreen(){
ModelAndView modelAndView = new ModelAndView("/sisStudent");
return modelAndView;
}
}
Any ideas?
Thank you in advance!
In your ModelAndView constructor remove the leading / so it should be
#RequestMapping (value="/openStudentSearchScreen", method = RequestMethod.GET)
public ModelAndView openCourseSearchScreen(){
ModelAndView modelAndView = new ModelAndView("sisStudent");
return modelAndView;
}
OTOH Insted of ModelAndView you can use String
#RequestMapping (value="/openStudentSearchScreen", method = RequestMethod.GET)
public String openCourseSearchScreen(){
return "sisStudent";//Tiles definition name
}
If you want to add some model attribute
#RequestMapping (value="/openStudentSearchScreen", method = RequestMethod.GET)
public String openCourseSearchScreen(Model model){
model.addAttribute("<name of the attribute>",<value as object>);
return "sisStudent";//Tiles definition name
}

How can a Spring Webflow application be configured to use Xslt to render its viewstates

I would like my Spring Webflow app to render its views using XSLT. I managed to get a pure Spring MVC app to render with xslt by configuring an XSLTviewresolver and a controller method that returned an already prepared xml as a source.
But I'm not sure how to apply that to the webflow app.
I've added the configuration for the XSLT view resolver and set the view state to the xsl, then I call the controller method that returns the xml source in the on-render of the view state.So far I only get the xsl back as the output and not the transformed xml or even the raw xml.
EDIT
flow.xml-full
<?xml version="1.0" encoding="UTF-8"?>
<flow xmlns="http://www.springframework.org/schema/webflow"
<view-state id="messageChoice" view="start1">
<transition on="chooseA" to="messageA"/>
<transition on="chooseB" to="messageB"/>
</view-state>
<view-state id="messageA" view="messageA">
<transition on="start" to="messageChoice"/>
</view-state>
<view-state id="messageB" view="xsltview">
<on-render>
<evaluate expression="sampleController.viewXSLT(externalContext.getNativeRequest(),externalContext.getNativeResponse())" result="requestScope.xmlSource"/>
</on-render>
<transition on="start" to="messageChoice"/>
</view-state>
<end-state id="finish"/>
</flow>
controller-snippet
#RequestMapping(value="/viewxslt")
public ModelAndView viewXSLT(HttpServletRequest request,
HttpServletResponse response) throws IOException {
// builds absolute path of the XML file
String xmlFile = "/WEB-INF/xml/thexml.xml";
String contextPath = request.getSession().getServletContext().getRealPath(xmlFile);
String xmlFilePath = ""+contextPath + File.separator + xmlFile;
Source source = new StreamSource(new File(contextPath));
// adds the XML source file to the model so the XsltView can detect
ModelAndView model = new ModelAndView("xsltview");
model.addObject("xmlSource", source);
return model;
}
EDIT
flow-config-full
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
<context:annotation-config />
<context:component-scan base-package="com.genkey.derek" />
<mvc:view-controller path="/start" />
<mvc:view-controller path="/messageHome" />
<mvc:resources location="/" mapping="/resources/**" />
<faces:resources />
<bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping">
<property name="flowRegistry" ref="flowRegistry" />
<property name="order" value="3" />
</bean>
<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/>
<bean id="xsltviewresolver" class="org.springframework.web.servlet.view.xslt.XsltViewResolver">
<property name="order" value="1"/>
<property name="sourceKey" value="xmlSource"/>
<property name="viewClass" value="org.springframework.web.servlet.view.xslt.XsltView"/>
<property name="viewNames">
<array>
<value>xsltview</value>
</array>
</property>
<property name="prefix" value="/WEB-INF/xsl/" />
<property name="suffix" value=".xsl" />
</bean>
<bean id="viewFactoryCreator" class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator">
<property name="viewResolvers">
<list>
<ref bean="xsltviewresolver"/>
<ref bean="faceletsViewResolver" />
</list>
</property>
</bean>
<bean id="faceletsViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass" value="org.springframework.faces.mvc.JsfView"/>
<property name="prefix" value="/WEB-INF/pages/" />
<property name="suffix" value=".xhtml" />
<property name="order">
<value>2</value>
</property>
</bean>
<bean class="org.springframework.faces.webflow.JsfFlowHandlerAdapter">
<property name="flowExecutor" ref="flowExecutor" />
</bean>
<webflow:flow-executor id="flowExecutor">
<webflow:flow-execution-listeners>
<webflow:listener ref="facesContextListener"/>
</webflow:flow-execution-listeners>
</webflow:flow-executor>
<webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices" >
<webflow:flow-location path="WEB-INF/flows/startFlow.xml"/>
</webflow:flow-registry>
<faces:flow-builder-services id="flowBuilderServices" view-factory-creator="viewFactoryCreator" development="true" />
<bean id="facesContextListener" class="org.springframework.faces.webflow.FlowFacesContextLifecycleListener"/>
</beans>

How to load js and css file in Spring MVC 3 with tiles3

I am unable to load the Js and Css files in to jsp using Spring MVC 3 with tiles3. Can someone help me. Here the my configuration.
Project Folder Structure
-SpringWithTiles
----webapp
--------resouces
----------script
--------------js
---------------myscript.js
--------------css
---------------style.css
----WEB-INF
-------jsp
---------signIn.jsp
servlet.xml
<bean class="org.springframework.web.servlet.view.UrlBasedViewResolver" id="viewResolver">
<property name="viewClass">
<value>
org.springframework.web.servlet.view.tiles3.TilesView
</value>
</property>
</bean>
<bean id="tilesConfigurer"
class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
<property name="definitions">
<list>
<value>/WEB-INF/tiles.xml</value>
</list>
</property>
</bean>
<mvc:resources mapping="/resources/script/js/**" location="/webapp/resources/script/css" />
<mvc:resources mapping="/resources/script/css/**" location="/webapp/resources/script/js" />`
tiles.xml
<tiles-definitions>
<definition name="baseLayout" template="/WEB-INF/layout/simpleLayout.jsp">
<put-attribute name="title" value="" />
<put-attribute name="header" value="/WEB-INF/layout/header.jsp"/>
<put-attribute name="body" value="" />
<put-attribute name="footer" value="/WEB-INF/layout/footer.jsp" />
</definition>
<!-- <definition name="baseLayoutWithLeftPane" template="/jsp/layout
/layoutWithLeftPane.jsp">
<put-attribute name="title" value="Learn - Educate" />
<put-attribute name="header" value="/jsp/layout/header.jsp" />
<put-attribute name="navigation" value="/jsp/layout/navigation.jsp" />
<put-attribute name="body" value="" />
<put-attribute name="footer" value="/jsp/layout/footer.jsp" />
</definition>
<definition name="welcome" extends="baseLayoutWithLeftPane">
<put-attribute name="title" value="Learn - Educate" />
<put-attribute name="body" value="/jsp/home.jsp" />
</definition> -->
<definition name="siginIn" extends="baseLayout">
<put-attribute name="title" value="siginIn" />
<put-attribute name="body" value="/WEB-INF/jsp/siginIn.jsp" />
</definition>
web.xml
<servlet-mapping>
<servlet-name>babwitU</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>/index.jsp</welcome-file>
</welcome-file-list>
index.jsp
Click Here
Contoller.java
#RequestMapping("/redirectToSiginIn")
public ModelAndView siginIn(){
ModelAndView mav=new ModelAndView();
mav.setViewName("/siginIn");
return mav;
}
In servlet.xml change mapping like this location="/resources/script/css"
and give path from resources/fileNameToLoad where you want to load ur js or css
In location attribute give path from /resources/** not from /webapps/
The correct mapping should be:
<mvc:resources mapping="/resources/script/js/**" location="/resources/script/css" />
<mvc:resources mapping="/resources/script/css/**" location="/resources/script/js" />
The first / in the attribute location indicates the ${webappRoot} already.
My problem get resolved with following configuration.. thanks for all
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:web="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" id="WebApp_ID" version="2.4">
<display-name>babwitU</display-name>
<servlet>
<servlet-name>babwitU</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/coreJava.xml,/WEB-INF/home.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>babwitU</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>/index.jsp</welcome-file>
</welcome-file-list>
<!-- <listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener> -->
</web-app>
servelt.xml
<context:component-scan base-package="com.babwitU.life.dream.controller" />
<mvc:annotation-driven />
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<!-- <property name="location" value="classpath:jdbc.properties" /> -->
</bean>
<!-- <bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp"></property>
<property name="suffix" value=".jsp"></property>
</bean> -->
<bean class="org.springframework.web.servlet.view.UrlBasedViewResolver" id="viewResolver">
<property name="viewClass">
<value>
org.springframework.web.servlet.view.tiles3.TilesView
</value>
</property>
</bean>
<bean id="tilesConfigurer"
class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
<property name="definitions">
<list>
<value>/WEB-INF/tiles.xml</value>
</list>
</property>
</bean>
<mvc:resources mapping="/resources/**" location="/resources/" />
controller.java
#RequestMapping(value ="redirectToSiginIn", method = RequestMethod.GET)
public ModelAndView viewSiginIn(){
ModelAndView mav=new ModelAndView();
mav.setViewName("siginIn");
return mav;
}
#RequestMapping(value ="home", method = RequestMethod.GET)
public ModelAndView viewHome(){
ModelAndView mav=new ModelAndView();
mav.setViewName("home");
return mav;
}
#RequestMapping(value ="java", method = RequestMethod.GET)
public ModelAndView viewJava(){
ModelAndView mav=new ModelAndView();
mav.setViewName("java");
return mav;
}
myjsp.jsp
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title> <tiles:getAsString name="title" ignore="true"></tiles:getAsString >
</title>
<!-- <script type="text/javascript" src="resources/script/js/appjs.js"></script>
--><link rel="stylesheet" type="text/css" href="resources/script/style.css">
</head>
<body>
folder structure
-springwithtiles
---webapp
-----resources
-------images
----------one.jpg
-------script
------------style.css
------------myjs.js
-----web-inf
--------jsp

Velocity with tiles 2 and spring-mvc

I am looking for a way to use velocity with tiles 2 :
in the end I want to switch from jsp / vm like this :
<tiles-definitions>
<definition extends="default" name="view1">
<put-attribute name="body" value="/WEB-INF/views/view1.jspx"/>
</definition>
<definition extends="default" name="view2">
<put-attribute name="body" value="/WEB-INF/views/view2.vm" type="velocity"/>
</definition>
</tiles-definitions>
What I want to do is exaclty explained here :
http://tiles.apache.org/framework/tutorial/integration/velocity.html
The first 2 point are easy but it is not clear what to do in the 3rd point :
I have to override the method : registerAttributeRenderers()
But what is the class to extend ?
Then what should I do with this class, I guess it has to be referenced somewhere in spring...
My current spring-mvc configuration :
<bean class="org.springframework.web.servlet.view.UrlBasedViewResolver" id="tilesViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView" />
</bean>
<bean class="org.springframework.web.servlet.view.tiles2.TilesConfigurer" id="tilesConfigurer">
<property name="definitions">
<list>
<value>/WEB-INF/layouts/layouts.xml</value>
<value>/WEB-INF/views/**/views.xml</value>
</list>
</property>
</bean>
thanks for help !

Resources