LOG.fine("BASE URL is "+getBaseUrl(req)); args.put(ARG_BASEURL, getBaseUrl(req));  registry.getConfiguration().setRequestArguments(args);
    public void doPost(HttpServletRequest req, HttpServletResponse resp)                throws ServletException, IOException    {        PrintWriter writer = null;                try {            String commandName = getCommandName(req);            Map args = parseRequestArguments(req);                        Output output = dispatcher.run(commandName, args);            // TODO see if conf.getRequestArguments() contains a            // different outputmode                        output.setOutputMode(DEF_OUTPUT_MODE);            String contentType = output.getContentType();            contentType = contentType == null ? DEF_CONTENT_TYPE : contentType;             resp.setContentType(contentType+"; charset="+outputEncoding);            writer = resp.getWriter();            output.output(writer);                    } catch (Exception ex) {            throw new ServletException(ex);        }    }