Search in sources :

Example 1 with FilterPrintWriter

use of org.apache.axis.transport.http.FilterPrintWriter in project Lucee by lucee.

the class RPCServer method doGet.

/**
 * Process GET requests. This includes handoff of pseudo-SOAP requests
 *
 * @param request request in
 * @param response request out
 * @throws ServletException
 */
public void doGet(HttpServletRequest request, HttpServletResponse response, Component component) throws ServletException {
    PrintWriter writer = new FilterPrintWriter(response);
    try {
        if (!doGet(request, response, writer, component)) {
            ReqRspUtil.setContentType(response, "text/html; charset=utf-8");
            writer.println("<html><h1>" + lucee.runtime.config.Constants.NAME + " Webservice</h1>");
            writer.println(Messages.getMessage("reachedServlet00"));
            writer.println("<p>" + Messages.getMessage("transportName00", "<b>http</b>"));
            writer.println("</html>");
        }
    } catch (Throwable e) {
        ExceptionUtil.rethrowIfNecessary(e);
        if (e instanceof InvocationTargetException)
            e = ((InvocationTargetException) e).getTargetException();
        if (e instanceof PageException)
            throw new PageServletException((PageException) e);
        throw new ServletException(e);
    }
}
Also used : ServletException(javax.servlet.ServletException) PageServletException(lucee.runtime.exp.PageServletException) PageException(lucee.runtime.exp.PageException) FilterPrintWriter(org.apache.axis.transport.http.FilterPrintWriter) PageServletException(lucee.runtime.exp.PageServletException) InvocationTargetException(java.lang.reflect.InvocationTargetException) PrintWriter(java.io.PrintWriter) FilterPrintWriter(org.apache.axis.transport.http.FilterPrintWriter)

Aggregations

PrintWriter (java.io.PrintWriter)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 ServletException (javax.servlet.ServletException)1 PageException (lucee.runtime.exp.PageException)1 PageServletException (lucee.runtime.exp.PageServletException)1 FilterPrintWriter (org.apache.axis.transport.http.FilterPrintWriter)1