Spring MVC.. jsp页面在WEB-INF下,想实现页面互访,但是WEB-INF下不能直接访问,拦截器设置成这样然后在controller进行跳转springMVC下也配置了,但是还是会报404
@RequestMapping("/indesx")
public string index(){
return "index";
}
地址拦输入/index 就可以了,地址开始要用/,返回的路径地址是相对地址
你试一下这个:
public ModelAndView test() throws exception{
ModelAndView mv = new ModelAndView();
mv.setViewName("你的jsp的名字");
return mv;
}
因为你已经配置好了jsp的前后缀了,只需要从你的前缀开始写就行。