Exemple #1
0
    WebXmlParser(ReadableArchive archive) throws XMLStreamException, IOException {

      if (archive.exists(getXmlFileName())) {
        try (InputStream is = archive.getEntry(getXmlFileName())) {
          init(is);
        } catch (Throwable t) {
          String msg =
              localStrings.getLocalString(
                  "web.deployment.exception_parsing_webxml",
                  "Error in parsing {0} for archive [{1}]: {2}",
                  getXmlFileName(),
                  archive.getURI(),
                  t.getMessage());
          throw new RuntimeException(msg);
        }
      }
    }