81,092
社区成员
发帖
与我相关
我的任务
分享
@RequestMapping("/AAA1")
public String AAA1() {
return "forward:WEB-INF/AAA.html";
}
不管用。。。。。WEB-INF下的页面不行,index.html却可以[/quote]
好吧……
@RequestMapping("/AAA1")
public String AAA1() {
return "forward:WEB-INF/AAA.html";
}
不管用。。。。。WEB-INF下的页面不行,index.html却可以
@RequestMapping("/")
public String index() {
return "forward:index.html";
}
@RequestMapping("/AAA1")
public String AAA1() {
return "forward:WEB-INF/AAA.html";
}
@RequestMapping("/AAA2")
public void AAA2(HttpServletRequest req, HttpServletResponse resp) throws Exception {
req.getRequestDispatcher("WEB-INF/AAA.html").forward(req, resp);
}
@RequestMapping("/AAA3")
public void AAA3(HttpServletRequest req, HttpServletResponse resp) throws Exception {
req.getRequestDispatcher("/WEB-INF/AAA.html").forward(req, resp);
}
这样改完发现还是只能访问 index 而 AAA1~3都 显示Whitelabel Error Pagereq.getRequestDispatcher("WEB-INF/AAA.html").forward(req, resp)
@RequestMapping("/")
public String index(){
return "redirect:AAA";
}
@RequestMapping("/Q")
public String Q(){
return "redirect:AAA.html";
}
@RequestMapping("/A")
public void A(HttpServletRequest req, HttpServletResponse resp) throws Exception {
resp.sendRedirect("AAA.html");
}
@RequestMapping("/Z")
public void Z(HttpServletRequest req, HttpServletResponse resp) throws Exception {
resp.sendRedirect("WEB-INF/AAA.html");
}
这4个还是访问不到AAA.html 请问下是该怎么写呢?