javax.servlet.ServletException: File "/.jsp" not found

问题:

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 ;
	}

简单修改,通过



你可能感兴趣的:(.....spring,MVC)