Example usage for javax.servlet ServletException getStackTrace

List of usage examples for javax.servlet ServletException getStackTrace

Introduction

In this page you can find the example usage for javax.servlet ServletException getStackTrace.

Prototype

public StackTraceElement[] getStackTrace() 

Source Link

Document

Provides programmatic access to the stack trace information printed by #printStackTrace() .

Usage

From source file:com.inverse2.ajaxtoaster.AjaxToasterServlet.java

public void errorResponse(HttpServletResponse response, String errString, String responseFormat,
        String callbackFunction) {

    println(errString);/*from   ww w . jav  a  2  s.c  om*/

    try {
        respondWithMessage(response, "error", errString, null, responseFormat, callbackFunction);
    } catch (ServletException ex) {
        log.error("ERROR Servlet exception printing error - " + ex.toString() + ". " + ex.getStackTrace());
    } catch (IOException ex) {
        log.error("ERROR IO Exception printing error - " + ex.toString() + ". " + ex.getStackTrace());
    }

    return;
}

From source file:com.inverse2.ajaxtoaster.AjaxToasterServlet.java

public void successResponse(HttpServletResponse response, String message, String responseFormat,
        String callbackFunction) {

    println(message);/*from  ww w.j  a  v  a2  s .  c o m*/

    try {
        respondWithMessage(response, "success", message, null, responseFormat, callbackFunction);
    } catch (ServletException ex) {
        log.error("ERROR Servlet exception printing error - " + ex.toString() + ". " + ex.getStackTrace());
    } catch (IOException ex) {
        log.error("ERROR IO Exception printing error - " + ex.toString() + ". " + ex.getStackTrace());
    }

    return;
}