Spring WebFlow + Thymeleaf form submit (no ajax!!!) - spring

I'm trying to build a sample app using Thymeleaf and Spring WebFlow.
I have a simple form where i have a text field in a object inside of the flowScope
this is the form:
<form id="mainForm" th:action="${flowExecutionUrl}">
<input type="text" id="selectedDate" th:value="${currentMonthStatus.selectedDate}" />
<input type="submit" name="_eventId" value="refresh" />
</form>
this is the flow:
<?xml version="1.0" encoding="UTF-8"?>
<flow xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow
http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"
parent="header">
<on-start>
<evaluate expression="initServiceBean.getCurrentMonthSituation('me')"
result="flowScope.currentMonthStatus" />
</on-start>
<view-state id="main" view="main/mainPage">
<transition on="refresh" to="reload" />
</view-state>
<action-state id="reload">
<evaluate
expression="initServiceBean.getMonthSituation(flowScope.currentMonthStatus.selectedDate, 'me')"
result="flowScope.currentMonthStatus" />
<transition to="main" />
</action-state>
</flow>
this is my webflow configuration
<?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"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:faces="http://www.springframework.org/schema/faces"
xmlns:webflow="http://www.springframework.org/schema/webflow-config"
xsi:schemaLocation="http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.1.xsd
http://www.springframework.org/schema/webflow-config http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.3.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/faces http://www.springframework.org/schema/faces/spring-faces-2.2.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
<context:component-scan base-package="it.addvalue.**.web.services" />
<mvc:annotation-driven />
<!-- <mvc:resources location="/" mapping="/resources/**" /> -->
<mvc:resources location="/img/" mapping="/img/**" />
<mvc:resources location="/css/" mapping="/css/**" />
<mvc:resources location="/js/" mapping="/js/**" />
<mvc:resources location="/less/" mapping="/less/**" />
<faces:resources />
<bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping">
<property name="flowRegistry" ref="flowRegistry" />
</bean>
<bean id="handlerMapping"
class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping" />
<!-- Resolves views selected for rendering by #Controllers to .xhtml resources
in the /WEB-INF/views directory -->
<bean class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass" value="org.springframework.faces.mvc.JsfView" />
<property name="prefix" value="/WEB-INF/views/" />
<property name="suffix" value=".xhtml" />
</bean>
<!-- Dispatches requests mapped to flows to FlowHandler implementations -->
<bean class="org.springframework.faces.webflow.JsfFlowHandlerAdapter">
<property name="flowExecutor" ref="flowExecutor" />
</bean>
<!-- Executes flows: the central entry point into the Spring Web Flow system -->
<webflow:flow-executor id="flowExecutor">
<webflow:flow-execution-listeners>
<webflow:listener ref="facesContextListener" />
</webflow:flow-execution-listeners>
</webflow:flow-executor>
<!-- The registry of executable flow definitions -->
<webflow:flow-registry id="flowRegistry"
flow-builder-services="flowBuilderServices" base-path="/WEB-INF/flows">
<webflow:flow-location-pattern value="/**/*-flow.xml" />
</webflow:flow-registry>
<!-- Configures the Spring Web Flow JSF integration -->
<faces:flow-builder-services id="flowBuilderServices"
development="true" view-factory-creator="mvcViewFactoryCreator" />
<!-- A listener to create and release a FacesContext -->
<bean id="facesContextListener"
class="org.springframework.faces.webflow.FlowFacesContextLifecycleListener" />
<!-- Thymeleaf integration -->
<bean id="templateEngine" class="org.thymeleaf.spring3.SpringTemplateEngine">
<property name="templateResolver" ref="templateResolver" />
</bean>
<bean id="templateResolver"
class="org.thymeleaf.spring3.templateresolver.SpringResourceTemplateResolver">
<property name="prefix" value="/thymeleaf/" />
<property name="suffix" value=".html" />
<property name="templateMode" value="HTML5" />
<property name="cacheable" value="false"/>
</bean>
<bean id="thymeleafViewResolver" class="org.thymeleaf.spring3.view.AjaxThymeleafViewResolver">
<property name="viewClass"
value="org.thymeleaf.spring3.view.FlowAjaxThymeleafView" />
<property name="templateEngine" ref="templateEngine" />
</bean>
<bean id="mvcViewFactoryCreator"
class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator">
<property name="viewResolvers" ref="thymeleafViewResolver" />
</bean>
</beans>
My problem is: the submit call a new flow instead of calling an action, where is the error?
It's my first time using WebFlow without JSF.

Approach 1:
<input type="submit" name="_eventId_refresh" value="refresh" />
When event is signalled, Web Flow looks for name beginning with "_eventId _" and treats the remaining substring as the event id. So in above case, submitting _eventId_refresh becomes refresh. This practice is followed when there are several events that can be signaled from the same form.
Approach 2:
<input type="submit" value="refresh" />
<input type="hidden" name="_eventId" value="refresh" />
When event is signalled, Web Flow looks for name _eventId and uses its value as the event id. This practice is followed when there is only one event that can be signaled on the form.
When you submit by click of the button and no eventId is found then flow execution is getting refreshed and its not a new flow.
So change your event according to your form and try.

Related

Unsupported view type /WEB-INF/index.xhtml only types supported by this FlowViewResolver implementation are [.jsp] and [.jspx]

We have a problem with Spring-webflow configuration and view redirection.
Upon login, you should enter the configured home page, but you are left in a redirect loop to the error page.
Checking the log traces, it is verified that when you submit in the login, it redirects to the corresponding view, but an error occurs with the spring component that controls the views and that only allows jsp and jspx.
We are working with Spring-webflow 2.4.1, Spring-mvc 3.1.4, jsf 2.2 and primefaces 4.0.
We have been verifying the different ways of how to do it with xml since it is an old application and what we are doing is refactoring from ant to maven in order to proceed with the modifications that are required.
The error that is generated is the following:
11:15:32,603 INFO [stdout] (http-localhost/127.0.0.1:8080-5) 10-06-2020 11:15:32,602 [DEBUG] [http-localhost/127.0.0.1:8080-5] [org.springframework.webflow.engine.impl.FlowExecutionImpl] Attempting to handle [org.springframework.webflow.execution.FlowExecutionException: Exception thrown in state 'index' of flow 'start-flow'] with root cause [java.lang.IllegalArgumentException: Unsupported view type /WEB-INF/index.xhtml only types supported by this FlowViewResolver implementation are [.jsp] and [.jspx]]
11:15:32,603 ERROR [com.axa.ca.caem.web.core.exception.CaemExceptionHandler] (http-localhost/127.0.0.1:8080-5) Handling exception
11:15:32,603 INFO [stdout] (http-localhost/127.0.0.1:8080-5) 10-06-2020 11:15:32,603 [ERROR] [http-localhost/127.0.0.1:8080-5] [com.axa.ca.caem.web.core.exception.CaemExceptionHandler] Handling exception
11:15:32,604 ERROR [com.axa.ca.caem.web.core.exception.CaemExceptionHandler] (http-localhost/127.0.0.1:8080-5) Unknown error captured in CaemExceptionHandler: java.lang.IllegalArgumentException: Unsupported view type /WEB-INF/index.xhtml only types supported by this FlowViewResolver implementation are [.jsp] and [.jspx]
at org.springframework.webflow.mvc.builder.FlowResourceFlowViewResolver.getViewInternal(FlowResourceFlowViewResolver.java:94) [spring-webflow-2.4.1.RELEASE.jar:2.4.1.RELEASE]
The configuration files are:
spring-webflow.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:webflow="http://www.springframework.org/schema/webflow-config"
xmlns:faces="http://www.springframework.org/schema/faces"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/webflow-config
http://www.springframework.org/schema/webflow-config/spring-webflow-config.xsd
http://www.springframework.org/schema/faces http://www.springframework.org/schema/faces/spring-faces.xsd">
<faces:resources/>
<!-- Maps request paths to flows in the flowRegistry; localeChangeInterceptor
is used for intercepting internationalization changes -->
<bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping">
<property name="flowRegistry" ref="flowRegistry" />
<property name="interceptors">
<list>
<ref bean="localeChangeInterceptor"></ref>
</list>
</property>
<property name="order" value="0"/>
</bean>
<bean class="org.springframework.faces.webflow.JsfFlowHandlerAdapter">
<property name="flowExecutor" ref="flowExecutor" />
</bean>
<webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry">
<webflow:flow-execution-listeners>
<webflow:listener ref="facesContextListener"/>
<webflow:listener ref="securityListener"/>
</webflow:flow-execution-listeners>
</webflow:flow-executor>
<!-- Registramos todos nuestros flujos con la dupla id-xml -->
<webflow:flow-registry id="flowRegistry" base-path="/WEB-INF/flows">
<webflow:flow-location-pattern value="/**.xml" />
<webflow:flow-location id="parent-flow" path="parent-flow.xml" />
</webflow:flow-registry>
<webflow:flow-builder-services id="flowBuilderServices" />
<!-- Mapea a nombres logicos de vista to recursos fisicos -->
<!-- Maps logical view names to Facelet templates in /WEB-INF (e.g. 'search' to '/WEB-INF/search.xhtml' -->
<bean class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass" value="org.springframework.faces.mvc.JsfView"/>
<property name="prefix" value="/WEB-INF/views/" />
<property name="suffix" value=".xhtml" />
</bean>
<!-- A listener to create and release a FacesContext -->
<bean id="facesContextListener" class="org.springframework.faces.webflow.FlowFacesContextLifecycleListener"/>
</beans>
Thanks in advance.
This is the correct configuration for me.
Thansk!
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:webflow="http://www.springframework.org/schema/webflow-config"
xmlns:faces="http://www.springframework.org/schema/faces"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/webflow-config
http://www.springframework.org/schema/webflow-config/spring-webflow-config.xsd
http://www.springframework.org/schema/faces
http://www.springframework.org/schema/faces/spring-faces.xsd">
<faces:resources/>
<!-- Spring Webflow central configuration component -->
<webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry">
<webflow:flow-execution-listeners>
<webflow:listener ref="facesContextListener"/>
<webflow:listener ref="securityListener"/>
</webflow:flow-execution-listeners>
</webflow:flow-executor>
<!-- Installs a listener that creates and releases the FacesContext for each request. -->
<bean id="facesContextListener" class="org.springframework.faces.webflow.FlowFacesContextLifecycleListener"/>
<webflow:flow-registry id="flowRegistry" flow-builder-services="facesFlowBuilderServices"
base-path="/WEB-INF/flows/" >
<webflow:flow-location-pattern value="/**.xml" />
<webflow:flow-location id="parent-flow" path="parent-flow.xml" />
</webflow:flow-registry>
<!-- Configures the Spring Web Flow JSF integration -->
<faces:flow-builder-services id="facesFlowBuilderServices" development="true" />
<bean id="mvcViewFactoryCreator" class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator">
<property name="viewResolvers">
<list>
<ref bean="viewResolver"/>
</list>
</property>
</bean>
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/views/"/>
<property name="suffix" value=".xhtml" />
</bean>
<!-- Dispatches requests mapped to flows to FlowHandler implementations -->
<bean class="org.springframework.faces.webflow.JsfFlowHandlerAdapter">
<property name="flowExecutor" ref="flowExecutor" />
</bean>
<bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping">
<property name="flowRegistry" ref="flowRegistry"/>
<property name="order" value="1"/>
</bean>
</beans>

Image not displayed in spring-boot version 1.5.3

I have been trying for more than an hour to display an image in my SpringBoot version 1.5.3 application.
I'm trying to display an image in my html page, which is the path:
And have used the image as:
<img src="images/DataServicesAdminAppLogo.png" width="40" height="40" class="d-inline-block align-top" alt="" hspace="10"/>
in my html page. But in vain. The image is not getting displayed.
Can someone please help?
UPDATE:
Network Inspector:
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:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/jdbc
http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.2.xsd">
<!-- <context:component-scan base-package="com.csaa.mdm"></context:component-scan> -->
<util:properties id="configLocProperties"
location="file:${app.config.home}/config/config.properties" />
<context:property-placeholder
location="file:${app.config.home}/config/config.properties" />
<bean id="configProperties"
class="com.csaa.mdm.adminApp.util.ApplicationPropertyConfigurer">
<property name="ignoreUnresolvablePlaceholders" value="true" />
<property name="ignoreResourceNotFound" value="true" />
<property name="location">
<value>file:${app.config.home}/config/config.properties
</value>
</property>
</bean>
<bean id="applicationPropertyUtil" class="com.csaa.mdm.adminApp.util.ApplicationPropertyUtil">
<property name="propertyConfigurer" ref="configProperties" />
</bean>
<bean id="metaCryptoUtil" class="com.csaa.mdm.adminApp.util.CryptoUtil">
<property name="userId" value="${oracle.meta.username}"></property>
<property name="password" value="${oracle.meta.password}"></property>
<property name="key" value="123456789012345678901234"></property>
</bean>
<!-- Create datasource and give connection properties -->
<bean id="metaDatasource" primary="true"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="${oracle.db.driver}" />
<property name="url" value="${oracle.db.dev.connection}" />
<property name="username" value="#{metaCryptoUtil.userId}" />
<property name="password" value="#{metaCryptoUtil.password}" />
</bean>
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="metaDatasource" />
</bean>
<!-- Create the dao object and pass the datasource to it -->
<bean id="adminDao" class="com.csaa.mdm.adminApp.dao.AdminDao">
<property name="jdbcTemplate" ref="jdbcTemplate" />
</bean>
<bean id="adminUtil" class="com.csaa.mdm.adminApp.util.AdminUtil">
<property name="configProperties" ref="configLocProperties"></property>
</bean>
<bean id="restTemplate" class="org.springframework.web.client.RestTemplate" />
</beans>

How to Inherit Single Property from parent bean to child bean

Here?In my Spring code all properties are inherited but i need only address property in to my child class
<beans xmlns="http://www.springframework.org/schema/beans"
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">
<bean id="baseEmployeeBean" class="com.java.beans.BaseEmployee">
<property name="company" value="Java2novice" />
<property name="address" value="mumbai" />
</bean>
<bean id="myEmployeeBean" class="com.java.beans.Employee" parent="baseEmployeeBean">
<property name="empId" value="1016" />
<property name="name" value="Nataraja Gootooru" />
</bean>
</beans>

spring mvc validation meesage param

I'm using spring mvc 4 , and there is a problem with message params in validation messages.
for example the output of #Size is : size must be between min and max.
and key bundle in hibernate validator is size must be between {min} and {max}.
this is my spring mvc config :
<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"
xmlns:task="http://www.springframework.org/schema/task" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx"
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-3.2.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.2.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
<context:component-scan base-package="net.devk"
use-default-filters="false">
<context:include-filter type="annotation"
expression="org.springframework.stereotype.Controller" />
</context:component-scan>
<bean id="viewResolver"
class="org.springframework.web.servlet.view.tiles3.TilesViewResolver" />
<bean id="tilesConfigurer"
class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
<property name="checkRefresh" value="true"/>
<property name="useMutableTilesContainer" value="true"/>
<property name="definitions">
<list>
<value>/WEB-INF/views/**/view.xml</value>
<value>/WEB-INF/layouts/layouts.xml</value>
</list>
</property>
</bean>
<!-- Configures the #Controller programming model -->
<!-- enables the support of annotation configuration for Spring MVC controllers,
as well as enabling Spring 3 type conversion and formatting support. Also,
support for JSR-303 Bean Validation is enabled by this tag -->
<mvc:annotation-driven validator="validator" />
<bean id="themeChangeInterceptor"
class="org.springframework.web.servlet.theme.ThemeChangeInterceptor">
<property name="paramName" value="theme" />
</bean>
<!-- Changes the locale when a 'locale' request parameter is sent; e.g.
/?locale=de -->
<bean id="localeChangeInterceptor"
class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
<property name="paramName" value="lang" />
</bean>
<!-- Configures Handler Interceptors -->
<mvc:interceptors>
<ref bean="localeChangeInterceptor" />
<ref bean="themeChangeInterceptor" />
</mvc:interceptors>
<!-- Handles HTTP GET requests for /resources/** by efficiently serving
up static resources in the ${webappRoot}/resources/ directory -->
<!-- <mvc:resources mapping="/static/**" location="/static/" /> -->
<!-- defines the static resources (for example, CSS, JavaScript, images,
and so on) and their locations so Spring MVC can improve the performance
in serving those files -->
<mvc:resources location="/resources/" mapping="/resources/**" />
<!-- Enables the mapping of the DispatcherServlet to the web application’s
root context URL, while still allowing static resource requests to be handled
by the container's default servlet -->
<mvc:default-servlet-handler />
<!-- Saves a locale change using a cookie -->
<bean id="localeResolver"
class="org.springframework.web.servlet.i18n.CookieLocaleResolver">
<property name="cookieName" value="locale" />
</bean>
<bean
class="org.springframework.ui.context.support.ResourceBundleThemeSource"
id="themeSource">
<property name="basenamePrefix" value="theme.theme-" />
</bean>
<bean class="org.springframework.web.servlet.theme.CookieThemeResolver"
id="themeResolver">
<property name="cookieName" value="theme" />
<property name="defaultThemeName" value="default" />
</bean>
<bean id="validator"
class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean">
<property name="validationMessageSource" ref="messageSource" />
</bean>
<bean
class="org.springframework.web.multipart.support.StandardServletMultipartResolver"
id="multipartResolver" />
<!-- Configure to plugin JSON as request and response in method handler -->
<bean
class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter">
<property name="messageConverters">
<list>
<ref bean="jsonMessageConverter" />
</list>
</property>
</bean>
<!-- Configure bean to convert JSON to POJO and vice versa -->
<bean id="jsonMessageConverter"
class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter" />
where is the problem?
finally i figured out the problem ...
i have to set
messageSource.setUseCodeAsDefaultMessage(false);
and then all message params replaced with the correct value !

Spring 3 with Thymeleaf config issue

Hello I have the following jars in my build path -
spring-beans-3.1.2.RELEASE.jar
spring-context-3.1.2.RELEASE.jar
spring-core-3.1.2.RELEASE.jar
spring-expression-3.1.2.RELEASE.jar
spring-web-3.1.2.RELEASE.jar
spring-webmvc-3.1.2.RELEASE.jar
thymeleaf-spring3-2.0.13.jar
and my servlet
<?xml version="1.0" encoding="UTF-8"?><br>
<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"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-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/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd">
<context:component-scan base-package="web.controller" />
<!-- Enabling Spring MVC configuration through annotations -->
<mvc:annotation-driven />
<!-- Mapping Static Resources -->
<mvc:resources mapping="/resources/**" location="/resources/" />
<bean id="templateResolver" class="org.thymeleaf.templateresolver.ServletContextTemplateResolver">
<property name="prefix" value="/WEB-INF/views/" />
<property name="suffix" value=".html" />
<property name="templateMode" value="HTML5" />
</bean>
<bean id="templateEngine" class="org.thymeleaf.spring3.SpringTemplateEngine">
<property name="templateResolver" ref="templateResolver" />
</bean>
<bean class="org.thymeleaf.spring3.view.ThymeleafViewResolver">
<property name="templateEngine" ref="templateEngine" />
<property name="order" value="1" />
<property name="viewNames" value="*.html" />
</bean>
</beans>
The error I get on launching is -
Cannot find class [org.thymeleaf.templateresolver.ServletContextTemplateResolver] for bean with name 'templateResolver' defined in ServletContext resource [/WEB-INF/springMVC-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.thymeleaf.templateresolver.ServletContextTemplateResolver
Am I missing any other library here? Any help is much appreciated.
You are missing the actual Thymeleaf jar. You included the Spring jar that provides the integration but you missed the actual implementation of it.
Download the jar from here
thymeleaf download site

Resources