Search in sources :

Example 1 with Command

use of com.adobe.acs.commons.quickly.Command in project acs-aem-commons by Adobe-Consulting-Services.

the class QuicklyServlet method doGet.

@Override
protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException {
    final Command cmd = new Command(request);
    response.setHeader("Content-Type", " application/json; charset=UTF-8");
    try {
        response.getWriter().append(quicklyEngine.execute(request, response, cmd).toString());
    } catch (Exception e) {
        response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
        response.getWriter().print("{\"status:\": \"error\"}");
    }
}
Also used : Command(com.adobe.acs.commons.quickly.Command) ServletException(javax.servlet.ServletException) IOException(java.io.IOException)

Aggregations

Command (com.adobe.acs.commons.quickly.Command)1 IOException (java.io.IOException)1 ServletException (javax.servlet.ServletException)1