javax.servlet.ServletException: File "/.jsp" not found
程序员文章站
2022-06-04 19:29:18
...
问题:
javax.servlet.ServletException: File "/.jsp" not found
来源于代码:
@RequestMapping(value="/checkcode")
public String checkcode(HttpServletRequest request,HttpServletResponse response)
throws ServletException, IOException{
ImageUtil.outputCaptcha(request, response, "checkCode");
return "";
}
其实已经很明显了,太久没有用有点生疏了。
在做验证码的时候,返回时return ""的话,会认为是一个return一个空的地址。导致了 指向不唯一。导致错误
@RequestMapping(value="/checkcode")
public void checkcode(HttpServletRequest request,HttpServletResponse response)
throws ServletException, IOException{
ImageUtil.outputCaptcha(request, response, "checkCode");
return ;
}
简单修改,通过
推荐阅读
-
Error: lexical or preprocessor issue file not found"; in Xcode 4
-
jsp includ总结 javax.servlet.ServletException: File amp;quot;/demo/header.jsp" not found
-
javax.servlet.ServletException: File "/.jsp" not found
-
axis2 File "/axis2-web/listSingleService.jsp" not found
-
Error: lexical or preprocessor issue file not found"; in Xcode 4