Name
ServletException
Synopsis
Class Name: javax.servlet.ServletException
Superclass: java.lang.Exception
Immediate Subclasses:
javax.servlet.UnavailableException
Interfaces Implemented: None
Availability: Servlet API 1.0 and later
Description
A generic exception thrown by servlets encountering difficulties.
Class Summary
public class ServletException extends java.lang.Exception { // Constructors public ServletException(); // New in 2.0 public ServletException(String msg); }
Constructors
ServletException()
public ServletException() public ServletException(String msg)
- Description
Constructs a new
ServletException
, with an optional descriptive message. If a message is specified, it can be retrieved by callinggetMessage()
and is usually included in server logs and user error messages.
Get Java Servlet Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.