Package javax.servlet

Examples of javax.servlet.ServletException.initCause()


        } catch (Throwable t) {
            logger.log(Level.WARNING, "Servlet web service endpoint '" +
                    servletName + "' failure", t);
            ServletException se = new ServletException();
            se.initCause(t);
            throw se;
        }
    }

    public void destroy() {
View Full Code Here


            } else {
                throw new ServletException("Service not found");
            }
        } catch (Throwable t) {
            ServletException se = new ServletException();
            se.initCause(t);
            throw se;
        }
        endedEvent(endpoint.getEndpointAddressPath());
    }
View Full Code Here

                        "Invalid wsdl request " + request.getRequestURL();
                (new WsUtil()).writeInvalidMethodType(response, message);
            }
        } catch (Throwable t) {
            ServletException se = new ServletException();
            se.initCause(t);
            throw se;
        }
    }

    private Adapter getEndpointFor(HttpServletRequest request) {
View Full Code Here

    private ServletException wrapException(Exception e, String msg) {
        this.logger.error(msg, e);

        ServletException servletException = new ServletException(msg, e);
        if (servletException.getCause() == null) {
            servletException.initCause(e);
        }

        return servletException;
    }
}
View Full Code Here

     */
    public static void throwServletException(Throwable cause)
            throws ServletException
    {
        ServletException servletException = new ServletException(cause);
        servletException.initCause(cause);
        throw servletException;
    }
}
View Full Code Here

                ServletException e = new ServletException(
                        "Error executing FreeMarker template", te);
                try {
                    // Prior to Servlet 2.5, the cause exception wasn't set by the above constructor.
                    // If we are on 2.5+ then this will throw an exception as the cause was already set.
                    e.initCause(te);
                } catch (Exception ex) {
                    // Ignored; see above
                }
                throw e;
            }
View Full Code Here

        // todo: future cleanup
        // the servlet 2.5 api sets does the equivalent of initCause in its constructor
        // where the servlet 2.4 api does not, so check for the 2.5 behavior before setting initCause
        if (servletException.getCause() == null) {
            servletException.initCause(cause);
        }
        throw servletException;
    }

    /**
 
View Full Code Here

    private ServletException wrapException(Exception e, String msg) throws ServletException {
        this.logger.error(msg, e);

        ServletException servletException = new ServletException(msg, e);
        if (servletException.getCause() == null) {
            servletException.initCause(e);
        }

        return servletException;
    }
}
View Full Code Here

                    request = UploadFilter.wrapRequest(httpRequest, map);

                } catch (FileUploadException ex) {
                    ServletException servletEx = new ServletException();
                    servletEx.initCause(ex);
                    throw servletEx;
                }
            }
        }
        chain.doFilter(request, response);
View Full Code Here

            } else {
                throw new ServletException("Service not found");
            }
        } catch (Throwable t) {
            ServletException se = new ServletException();
            se.initCause(t);
            throw se;
        }
        endedEvent(endpoint.getEndpointAddressPath());
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.