I am porting an app and have a bunch of JSP/JSTL views I want to move over. The previous app used an InternalResourceViewResolver, but I've read that's incompatible with the UrlBasedViewResolver already configured for Tiles. So I added a ResourceBundleViewResolver and used the order property:
In my controller:Code:<bean id="viewResolver" class="org.springframework.web.servlet.view.ResourceBundleViewResolver" p:basename="jspviews" p:order="0" /> <bean class="org.springframework.web.servlet.view.UrlBasedViewResolver" id="tilesViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView"/> <property name="order" value="1"/> </bean>
I've added a jspviews.properties file in webapp/WEB-INF/classes:Code:return new ModelAndView("registrationForm", "model", model);
However, I keep getting this exception:Code:registrationForm(.class)=org.springframework.web.servlet.view.JstlView registrationForm.url=/WEB-INF/jsp/registrationForm.jsp
java.lang.IllegalStateException: No bean class specified on bean definition
...
Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'registrationForm': Instantiation of bean failed; nested exception is java.lang.IllegalStateException: No bean class specified on bean definition
I'd be grateful if anyone could tell me what I'm doing wrong.


Reply With Quote