diff --git a/pom.xml b/pom.xml index 4facd24..11ab507 100644 --- a/pom.xml +++ b/pom.xml @@ -94,6 +94,26 @@ ${org.egovframe.rte.version} + + javax.servlet javax.servlet-api diff --git a/src/main/java/cokr/xit/foundation/web/AccessInitializer.java b/src/main/java/cokr/xit/foundation/web/AccessInitializer.java index f16230a..887a451 100644 --- a/src/main/java/cokr/xit/foundation/web/AccessInitializer.java +++ b/src/main/java/cokr/xit/foundation/web/AccessInitializer.java @@ -9,6 +9,7 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.springframework.stereotype.Component; import org.springframework.web.servlet.LocaleResolver; import org.springframework.web.servlet.ModelAndView; @@ -26,6 +27,7 @@ import cokr.xit.foundation.component.ServiceRequest; * *

AccessInitializer가 동작하려면 인터셉터로 설정해야 한다.

*/ +@Component("accessInitializer") public class AccessInitializer extends RequestInterceptor { @Resource(name="applicationContainer") protected ApplicationContainer applicationContainer; diff --git a/src/main/java/cokr/xit/foundation/web/ExceptionController.java b/src/main/java/cokr/xit/foundation/web/ExceptionController.java index 0a9ab20..22a4497 100644 --- a/src/main/java/cokr/xit/foundation/web/ExceptionController.java +++ b/src/main/java/cokr/xit/foundation/web/ExceptionController.java @@ -55,6 +55,20 @@ public class ExceptionController extends AbstractController { .addObject("home", true); } + /**세션 만료 시 처리를 위한 정보를 갖는 ModelAndView를 반환한다. + * @param hreq 서블릿 요청 + * @return ModelAndView + */ + @RequestMapping("/error/invalidSession.do") + public ModelAndView invalidSession(HttpServletRequest hreq) { + return new ModelAndView(ajaxRequest() ? "jsonView" : "error/errorPage") + .addObject("path", getAction(hreq)) + .addObject("failed", true) + .addObject("status", "invalidSession") + .addObject("message", message("invalidSession")) + .addObject("home", true); + } + /**접근 거부 오류의 처리를 위한 정보를 갖는 ModelAndView를 반환한다. * @param hreq 서블릿 요청 * @return ModelAndView