Bonjour,
Hi, I use spring and jsp in my application. I cannot redirect to an error page
Here is my controller
I use spring securityCode:public ModelAndView index(final HttpServletRequest request, final HttpServletResponse response) throws ServletRequestBindingException, DatatypeConfigurationException { // something boolean isOnTheGoodSession = accountManagementService.checkRandomNumber(); if (isOnTheGoodSession) { // something return new ModelAndView("index", "model", model); } else { // my error page is newBrowser.jsp return new ModelAndView("../../newBrowser", "model", model); } }
here is a part of the xml file
and my application tree (I tried to put my error page "newBrowser.jsp" in 2 locations but without success) is at the following addressCode:<http entry-point-ref="authenticationEntryPoint" disable-url-rewriting="true"> <!--Restrict URLs based on role--> <intercept-url pattern="/css/**" filters="none" requires-channel="https"/> <intercept-url pattern="/js/**" filters="none" requires-channel="https"/> <intercept-url pattern="/ext/**" filters="none" requires-channel="https"/> <intercept-url pattern="/img/**" filters="none" requires-channel="https"/> <intercept-url pattern="/userguide/**" access="IS_AUTHENTICATED_ANONYMOUSLY" requires-channel="https"/> <intercept-url pattern="/login.htm*" access="IS_AUTHENTICATED_ANONYMOUSLY" requires-channel="https"/> <!-- requires-channel="https"/> --> <intercept-url pattern="/login.jsp*" access="ROLE_RDE" requires-channel="https"/> <intercept-url pattern="/user/**" access="IS_AUTHENTICATED_ANONYMOUSLY" requires-channel="https"/> <intercept-url pattern="/secure/**" access="ROLE_RDE" requires-channel="https"/> <intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" requires-channel="https"/> <custom-filter position="FORM_LOGIN_FILTER" ref="authenticationFilter"/> <session-management invalid-session-url="/reconnection.htm"> <!--<concurrency-control max-sessions="1" error-if-maximum-exceeded="true"/> --> </session-management> <logout logout-success-url="/login.htm"/> </http>
http://imageshack.us/photo/my-images...ewbrowser.png/
Thank you in advance for your answers


Reply With Quote