說明某個方法在方法聲明上已經聲明了會拋異常,那么在調用這個方法的時候,就必須做異常處理,處理的方式有2種,要么try-catch這個異常,要么繼續往上一層拋出這個異常,這是java語法要求的,
必須這么做
public void getFireWalls(HttpServletResponse response, HttpServletRequest request, HttpSession session)
throws IOException {
UserModel u = AuthUtil.getLoginUser(request);
String path = request.getParameter("path");
path = URLDecoder.decode(path, "UTF-8");