code: private String parseWebXml(URL location) {
  
          if (log.isTraceEnabled()) {
              log.trace("Processing possible web.xml location: " + location);
          }
  
          InputStream webXmlStream = null;
  
          // try to open this guessed location of the web.xml
          try {
  
              webXmlStream = location.openStream();
  
          } catch (IOException e) {
              if (log.isDebugEnabled()) {
                  log.debug("Unable to open web.xml: " + e.getMessage());
              }
          }
  
          if (webXmlStream != null) {
  
              try {
  
                  // parse the input stream
                  WebXmlContextParameterParser parser = new WebXmlContextParameterParser();
                  parser.parse(webXmlStream);
  
                  // return the project stage if the parser found it
                  String projectStage = parser.getContextParameter(ProjectStage.PROJECT_STAGE_PARAM_NAME);
  
                  // did we find a project stage?
                  if (projectStage != null) {
  
                      if (log.isDebugEnabled()) {
                          log.debug("Found project stage in web.xml: " + projectStage);
                      }
  
                      return projectStage;
  
                  }
  
              } catch (IOException e) {
                  if (log.isDebugEnabled()) {
                      log.debug("Parsing of web.xml failed: " + e.getMessage());
                  }
              }
  
          }
  
          // no result
          return null;
  
      }
docs: Tries to parse the project stage from the supplied web.xml location. The method will return <code>null</code> if the
  web.xml does not exist, cannot be opened, a parsing error occurred or if the web.xml doesn't contain a context parameter
  specifying the project stage.
  
  @param location URL of the web.xml
  @return project stage or <code>null</code>