httpSession.setAttribute("ORIGINAL_URI", request.getRequestURI());
httpSession.setAttribute("ORIGINAL_URI", uri); System.out.println("Setting ORIGINAL_URI: " + uri);  final String relativeURI = uri.substring(APP_CONTEXT_LENGTH); final int indexOfSlash = relativeURI.indexOf('/'); final String module = (indexOfSlash >= 0) ? relativeURI.substring(0, indexOfSlash) : ""; System.out.println("relative url: " + relativeURI); System.out.println("module: " + module);  httpSession.setAttribute("ORIGINAL_MODULE", module);
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)            throws IOException, ServletException {        final HttpServletRequest request = (HttpServletRequest) servletRequest;        final HttpServletResponse response = (HttpServletResponse) servletResponse;        final String uri = request.getRequestURI();        final IUserView userView = getUserView(request);        if (isPrivateURI(uri.substring(APP_CONTEXT_LENGTH)) && !validUserView(userView)) {        	final HttpSession httpSession = request.getSession(true);        	httpSession.setAttribute("ORIGINAL_REQUEST", request);        	httpSession.setAttribute("ORIGINAL_URI", request.getRequestURI());            final Map<String, Object> parameterMap = new HashMap<String, Object>();            for (final Entry<String, Object> entry : ((Map<String, Object>) request.getParameterMap()).entrySet()) {                parameterMap.put(entry.getKey(), entry.getValue());            }            httpSession.setAttribute("ORIGINAL_PARAMETER_MAP", parameterMap);            final Map<String, Object> attributeMap = new HashMap<String, Object>();        	final Enumeration enumeration = request.getAttributeNames();        	while (enumeration.hasMoreElements()) {        		final String attributeName = (String) enumeration.nextElement();        		attributeMap.put(attributeName, request.getAttribute(attributeName));        	}        	httpSession.setAttribute("ORIGINAL_ATTRIBUTE_MAP", attributeMap);            response.sendRedirect(REDIRECT);        } else {            filterChain.doFilter(request, response);        }    }