views:

1038

answers:

1

Hello!

I have a view resolver:

<bean id="jspViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
    <property name="prefix" value="/WEB-INF/jsp/"/>
    <property name="suffix" value=".jsp"/>
    <property name="order"><value>1</value></property>
</bean>

And a method:

@RequestMapping("/hello_world.html")
public ModelAndView index() {
    ModelAndView mav = new ModelAndView("test");
    return mav;
}

I would like to render /WEB-INF/jsp/test.jsp but it always try to render /WEB-INF/jsp/hello_world.jsp

How can I define custon view page inside index()?

Thank you

A: 

Import org.springframework.web.servlet.ModelAndView instead of org.springframework.web.portlet.ModelAndView! ;^)

klorand