ejbcawebbean.initialize(req, "/ca_functionallity/basic_functions");
ejbcawebbean.initialize(req, "/ca_functionality/basic_functions");
    public void doGet(HttpServletRequest req,  HttpServletResponse res) throws java.io.IOException, ServletException {        log.debug(">doGet()");        // Check if authorized        EjbcaWebBean ejbcawebbean= (se.anatom.ejbca.webdist.webconfiguration.EjbcaWebBean)                                   req.getSession().getAttribute("ejbcawebbean");        if ( ejbcawebbean == null ){          try {            ejbcawebbean = (se.anatom.ejbca.webdist.webconfiguration.EjbcaWebBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "se.anatom.ejbca.webdist.webconfiguration.EjbcaWebBean");           } catch (ClassNotFoundException exc) {               throw new ServletException(exc.getMessage());           }catch (Exception exc) {               throw new ServletException (" Cannot create bean of class "+"se.anatom.ejbca.webdist.webconfiguration.EjbcaWebBean", exc);           }           req.getSession().setAttribute("ejbcawebbean", ejbcawebbean);        }        try{          ejbcawebbean.initialize(req, "/ca_functionallity/basic_functions");        } catch(Exception e){           throw new java.io.IOException("Authorization Denied");        }        try{          if(storehome == null){            storehome = (ICertificateStoreSessionHome) PortableRemoteObject.narrow(              ctx.lookup("CertificateStoreSession"), ICertificateStoreSessionHome.class );          }        } catch(Exception e){           throw new java.io.IOException("Authorization Denied");        }                String issuerdn = null;         if(req.getParameter(ISSUER_PROPERTY) != null){          issuerdn = java.net.URLDecoder.decode(req.getParameter(ISSUER_PROPERTY),"UTF-8");        }                String command;        // Keep this for logging.        String remoteAddr = req.getRemoteAddr();        command = req.getParameter(COMMAND_PROPERTY_NAME);        if (command == null)            command = "";        if (command.equalsIgnoreCase(COMMAND_CRL) && issuerdn != null) {            try {                Admin admin = new Admin(((X509Certificate[]) req.getAttribute( "javax.servlet.request.X509Certificate" ))[0]);                ICertificateStoreSessionRemote store = storehome.create();                byte[] crl = store.getLastCRL(admin, issuerdn);                X509CRL x509crl = CertTools.getCRLfromByteArray(crl);                String dn = CertTools.getIssuerDN(x509crl);                String filename = CertTools.getPartFromDN(dn,"CN")+".crl";                res.setHeader("Content-disposition", "attachment; filename=" +  filename);                res.setContentType("application/pkix-crl");                res.setContentLength(crl.length);                res.getOutputStream().write(crl);                log.info("Sent latest CRL to client at " + remoteAddr);            } catch (Exception e) {                PrintStream ps = new PrintStream(res.getOutputStream());                res.sendError(HttpServletResponse.SC_NOT_FOUND, "Error getting latest CRL.");                e.printStackTrace(ps);                log.error("Error sending latest CRL to " + remoteAddr, e);                return;            }        }    } // doGet