views:

38

answers:

1

Hi,

I'm working with Spring MVC. I have a controller which returns a new ModelAndView(new RedirectView(getSuccessView())). SuccessView is set as home.htm which is a virtual page that maps to WEB-INF/jsp/home.jsp.

However I'm getting this error:

No mapping found for HTTP request with URI [/Bikes_Spring/WEB-INF/jsp/home.htm] in DispatcherServlet.

As you can see it's searching for home.htm inside the jsp folder... it should be /Bikes_Spring/home.htm

Any ideas how I could resolve this? Thanks :)

Krt_Malta

A: 

In my resolver mapping, I added redirect: in front of home.htm and it did the trick:

<property name="successView"><value>redirect:home.htm</value></property>

What I wanted to do was go from one controller to another... sry I'm still quite a newbie in spring...

Krt_Malta
Are you sure you have `new RedirectView(...)` in the value returned by controller, as you stated in the question? The behaviour you describes looks like it's missing.
axtavt