Changeset 33387


Ignore:
Timestamp:
2019-08-06T11:33:16+12:00 (5 years ago)
Author:
kjdon
Message:

removed all my debug statements

Location:
main/trunk/greenstone3/src/java/org/greenstone/gsdl3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/LibraryServlet.java

    r33256 r33387  
    445445        session.setMaxInactiveInterval(session_expiration);
    446446        String uid = session.getId();
    447         logger.error("uid = "+uid);
    448447        request.setCharacterEncoding("UTF-8");
    449448        response.setContentType("text/html;charset=UTF-8");
     
    464463        userContext.setLanguage(lang);
    465464        userContext.setUserID(uid);
    466         logger.error ("setting user context "+ uid);
    467465        if (request.getAuthType() != null)
    468466        {
    469467            //Get the username
    470           userContext.setUsername(request.getUserPrincipal().getName());
    471           logger.error("adding username "+request.getUserPrincipal().getName());
     468          userContext.setUsername(request.getUserPrincipal().getName());
    472469
    473470            //Get the groups for the user
     
    552549            should_cache = false;
    553550
    554             logger.error("KATH: cleaning up the cache");
    555551            // we may want to remove all collection cache info, or just a specific collection
    556552            boolean clean_all = true;
     
    608604        }
    609605       
    610          logger.error("should_cache= " + should_cache);
    611          logger.error("cache key = " + cache_key);
    612606        //clear the collection-specific cache in the session, since we have no way to know whether this session is
    613607        //about the same collection as the last session or not.
     
    619613            {
    620614                session.removeAttribute(name);
    621                 logger.error("XXX removing "+name+" from the session");
    622615            }
    623616        }
     
    632625            if (session_ids_table.containsKey(sid))
    633626            {
    634               logger.error("cache contains sesion id");
    635627                session_cache = session_ids_table.get(sid);
    636628                param_table = session_cache.getParamsTable();
    637629                if (param_table.containsKey(cache_key))
    638630                {
    639                     logger.error("existing table: " + cache_key);
    640631                    table = param_table.get(cache_key);
    641632                }
     
    644635                    table = new Hashtable<String, String>();
    645636                    param_table.put(cache_key, table);
    646                     logger.error("new table: " + cache_key);
    647637                    new_table = true;
    648638                }
     
    650640            else
    651641            {
    652               logger.error("cache doesn't contain session id");
    653642                param_table = new Hashtable<String, Hashtable<String, String>>();
    654643                table = new Hashtable<String, String>();
     
    667656              String v = this.gs_params.getParamDefault(p);
    668657              if (!p.equals(GSParams.ACTION) && !p.equals(GSParams.SUBACTION) && !p.equals(GSParams.LANGUAGE) && !p.equals(GSParams.OUTPUT)) {
    669                 logger.error("adding to new table default param "+p+", "+v);
    670658                table.put(p,v);
    671659              }
     
    704692                {// we have already dealt with these
    705693
    706                   logger.error("query map:" + name);
    707694                    String value = "";
    708695                    String[] values = queryMap.get(name);
     
    718705                    if (this.gs_params.shouldSave(name) && table != null)
    719706                    {
    720                       logger.error("adding to table");
    721707                        table.put(name, value);
    722708                    }
    723709                    else
    724710                    {
    725                       logger.error("adding param to xml param list");
    726711                        Element param = msg_doc.createElement(GSXML.PARAM_ELEM);
    727712                        param.setAttribute(GSXML.NAME_ATT, name);
     
    743728                {
    744729                    String name = keys.nextElement();
    745                     logger.error("adding from table to session "+name);
    746730                    session.setAttribute(name, table.get(name));
    747731                }
     
    750734            // put in all the params from the session cache
    751735            Enumeration params = session.getAttributeNames();
    752             logger.error("add in session attributes");
    753736            while (params.hasMoreElements())
    754737            {
    755738                String name = (String) params.nextElement();
    756                 logger.error("session attribute "+name);
    757739                if (!name.equals(GSXML.USER_SESSION_CACHE_ATT) && !name.equals(GSParams.LANGUAGE) && !name.equals(GSXML.USER_ID_ATT))
    758740                {
     
    10611043        if (table == null)
    10621044        {
    1063             logger.info("cached table is null");
     1045          //logger.info("cached table is null");
    10641046            return;
    10651047        }
    10661048        if (table.size() == 0)
    10671049        {
    1068             logger.info("cached table size is zero");
     1050          //logger.info("cached table size is zero");
    10691051            return;
    10701052        }
     
    10751057            num_cached_coll += cache_list.get(i).tableSize();
    10761058        }
    1077         logger.info("Number of sessions : total number of cached collection info = " + table.size() + " : " + num_cached_coll);
     1059        //logger.info("Number of sessions : total number of cached collection info = " + table.size() + " : " + num_cached_coll);
    10781060    }
    10791061
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/MessageRouter.java

    r33180 r33387  
    177177            this.site_http_address = web_address + "/"+this.library_name+"/sites/" + this.site_name;
    178178        }
    179         logger.error("KATH - site http address = "+this.site_http_address);
    180179        // are we behind a firewall?? - is there a better place to set up the proxy?
    181180        String host = GlobalProperties.getProperty("proxy.host");
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/URLFilter.java

    r33347 r33387  
    495495                   
    496496    Element mr_response = (Element)gsRouter.process(securityMessage);
    497     logger.debug("security response = "+XMLConverter.getPrettyString(mr_response));
     497    //logger.debug("security response = "+XMLConverter.getPrettyString(mr_response));
    498498
    499499    boolean verifiable_file = true;
     
    538538      if (!verify.equals("")) {
    539539      // we are asking for the main document, and we have been asked to verify the user
    540       logger.error("KATH verifiable file is true");
    541 
    542540      // have we done the test previously?
    543541      boolean already_verified = false;
     
    551549          // we haven't done this at all, set up the map
    552550          verifiedUserMap = new Hashtable<String, UserTimer>();
    553           logger.error("KATH setting up new user map");
    554551        } else {
    555552          // check this map
     
    558555          }
    559556        }
    560         logger.error("KATH already verified = "+already_verified);
    561557      }
    562558     
    563559      if (!already_verified) {
    564560          // have we just  done the test?
    565           //String hmvf_response = request.getParameter(GSParams.VERIFIED);
    566561          // hmvf param will be set by form if the verify page was submitted
    567562          if (hmvf_response != null && hmvf_response.equals("1")) {
    568         logger.error("user has submitted the form, check recaptcha response");
    569563        if (!securityResponse.getAttribute(GSXML.SITE_KEY_ATT).equals("")) {
    570564          String recaptcha_response = request.getParameter(Authentication.RECAPTCHA_RESPONSE_PARAM);
    571565          String secret_key = securityResponse.getAttribute(GSXML.SECRET_KEY_ATT);
    572566          int result = Authentication.verifyRecaptcha(secret_key, recaptcha_response);
    573           logger.error("recaptcha result code = "+result);
    574567          if (result == Authentication.NO_ERROR) {
    575             logger.error("RECAPTCHA SUCCESS, hopefully going to the document");
    576568            already_verified = true;
    577569           
     
    603595        // or we have been asked to force the T&C
    604596        // we need to display the verify page
    605         logger.error("KATH display verify page");
    606         //String new_url = context.getContextPath()+"/"+ context.getAttribute("LibraryName")+"?a=p&sa=verify&c="+collection+"&url="+url;
    607597        String new_url = context.getContextPath()+"/"+ library_name+"?a=p&sa=verify&c="+collection+"&url="+url;             
    608598        ((HttpServletResponse)response).sendRedirect(new_url);
     
    656646    if (metadataList.getLength() == 0) {
    657647     
    658       logger.error("Could not find the document related to this url");
     648      logger.error("Could not find the document ID related to this url");
    659649      return null;
    660650    }
Note: See TracChangeset for help on using the changeset viewer.