💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
**1.跳转百度** ~~~ @RequestMapping("fun7") public String fun7(){ return "redirect:http://www.baidu.com"; } ~~~ **2.跳转内部jsp页面** ~~~ @RequestMapping("fun7") public String fun7(){ //webapp是根目录 return "redirect:/index.jsp"; } ~~~ 3.使用ServletApi跳转内部jsp页面 ~~~ @RequestMapping("fun8") public void fun8(HttpServletRequest request, HttpServletResponse response){ try{ response.sendRedirect(request.getContextPath()+"/index.jsp"); }catch(IOException e){ e.printStackTrace(); } } ~~~