1
votes

MY Application is giving following Exception

org.springframework.beans.factory.BeanCreationException :Error creating bean with name '/userRegistration.htm' defined in ServletContext resource [/WEB-INF/dispatcher- servlet.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'successVeiw' of bean class [com.vaannila.web.UserController]: Bean property 'successVeiw' is not writable or has an invalid setter method. Did you mean 'successView'?

and this is my dispatcher-servlet.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:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans                    http://www.springframework.org/schema/beans/spring-beans.xsd">

   <bean id="viewResolver"

   class="org.springframework.web.servlet.view.InternalResourceViewResolver"

    p:prefix="/WEB-INF/JSPs/" p:suffix=".jsp" />

   <bean id="userService" class="com.vaannila.service.UserServiceImpl"/>

   <bean name="/userRegistration.htm" class="com.vaannila.web.UserController"
    p:userService-ref="userService"
    p:formView="userForm"
    p:successVeiw="userSuccess"/>
   </beans>
1

1 Answers

5
votes

It's a typo. The exception tells you what's wrong:

Invalid property 'successVeiw'

You want

p:successView

not

p:successVeiw