Context(HttpServletRequest req, HttpServletResponse resp, UserServlet servlet) throws UserServletException, ServiceException {
Context(HttpServletRequest request, HttpServletResponse response, UserServlet servlet) throws UserServletException, ServiceException {
        Context(HttpServletRequest req, HttpServletResponse resp, UserServlet servlet)                throws UserServletException, ServiceException {                        Provisioning prov = Provisioning.getInstance();                        this.req = req;            this.resp = resp;            String pathInfo = req.getPathInfo().toLowerCase();            if (pathInfo == null || pathInfo.equals("/") || pathInfo.equals("")                    || !pathInfo.startsWith("/")) {                throw new UserServletException(                        HttpServletResponse.SC_BAD_REQUEST, "invalid path");            }            int pos = pathInfo.indexOf('/', 1);            if (pos == -1) {                throw new UserServletException(                        HttpServletResponse.SC_BAD_REQUEST, "invalid path");            }            this.accountPath = pathInfo.substring(1, pos);            this.itemPath = pathInfo.substring(pos + 1);            this.format = req.getParameter(QP_FMT);            String id = req.getParameter(QP_ID);            try {                this.itemId = id == null ? null : new ItemId(id, null);            } catch (ServiceException e) {                throw new UserServletException(                        HttpServletResponse.SC_BAD_REQUEST,                        "invalid id requested");            }            if (this.format != null) {                this.format = this.format.toLowerCase();                this.formatter = servlet.getFormatter(this.format);                if (this.formatter == null)                    throw new UserServletException(                            HttpServletResponse.SC_NOT_IMPLEMENTED,                            "not implemented yet");            }                            // see if we can get target account or not            if (itemId != null && itemId.getAccountId() != null) {                targetAccount = prov.getAccountById(itemId.getAccountId());                return;            } else if (accountPath.equals("~")) {                // can't resolve this yet                return;            } else if (accountPath.startsWith("~")) {                accountPath = accountPath.substring(1);            }            targetAccount = prov.getAccountByName(accountPath);                        }