protected void doGet()

in src/main/java/org/apache/sling/launchpad/testservices/servlets/XpathServlet.java [49:62]


    protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)
            throws ServletException, IOException {

        try {
            XPath xpath = XPathFactory.newInstance().newXPath();

            String result = xpath.evaluate("/content/name", new InputSource(new StringReader(XML_INPUT)));

            response.setContentType("text/plain");
            response.getWriter().write(result);
        } catch (XPathExpressionException e) {
            throw new ServletException(e.getMessage(), e);
        }
    }