Chris Papademos created SLING-2532:
--------------------------------------

             Summary: sendRedirect in the SlingAllMethodsServlet doesn't work 
properly
                 Key: SLING-2532
                 URL: https://issues.apache.org/jira/browse/SLING-2532
             Project: Sling
          Issue Type: Bug
          Components: Servlets
         Environment: Windows 7, Sling 6
            Reporter: Chris Papademos


Im trying to enable the user to delete his own account by sending a get Request 
to /satlab/user/delete.

First Im trying to log him out, by sending a redirect to 
/system/sling.logout.html

I also tried: 

 Session session =  request.getResourceResolver().adaptTo(Session.class);
session.logout();

but this doesnt seem to work. Am I doing something wrong? Or is that a bug?

@Override
        protected void doGet(SlingHttpServletRequest request,
                        SlingHttpServletResponse response) throws 
ServletException,
                        IOException {
                response.sendRedirect("/system/sling/logout.html");
                String userID = request.getParameter("userID");
                System.out.println(userID);
                UserUtility.removePrivateFolder(userID);
                UserUtility.removeUser(userID);
        }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to