I have a website using spring web mvc and spring mobile. Everything works great except for when I return the ModelAndView object as a redirect (ModelAndView("redirect:/")). I am using the latest version of spring mobile which includes a view resolver that will add a prefix to the view file path. So if a mobile visitor is redirected to "/" the url will become www.website.com/mobile//. What is the best way to ignore redirect requests in the LiteDeviceDelegatingViewResolver?
controller code
resolver codeCode://display the dashboard if everything goes smoothly return new ModelAndView("redirect:/");
BTW, love the product, works great!Code:<beans:bean class="org.springframework.mobile.device.view.LiteDeviceDelegatingViewResolver"> <beans:constructor-arg> <beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <beans:property name="viewClass" value="org.springframework.web.servlet.view.JstlView" /> <beans:property name="prefix" value="/WEB-INF/jsp/" /> <beans:property name="suffix" value=".jsp" /> </beans:bean> </beans:constructor-arg> <beans:property name="enableFallback" value="true" /> <beans:property name="mobilePrefix" value="mobile/" /> <beans:property name="tabletPrefix" value="tablet/" /> </beans:bean>


Reply With Quote