`
isiqi
  • 浏览: 16482766 次
  • 性别: Icon_minigender_1
  • 来自: 济南
社区版块
存档分类
最新评论

javax.servlet.ServletException翻译

阅读更多
<!-- ========= START OF TOP NAVBAR ======= --><!-- -->
JavaTM 2 Platform
Ent. Ed. v1.4
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->

javax.servlet
Class ServletException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjavax.servlet.ServletException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
UnavailableException

public class ServletException
extends Exception

Defines a general exception a servlet can throw when it encounters difficulty. 定义一个通用异常,servlet遭遇麻烦时抛出。

Version:
$Version$
Author:
Various
See Also:
Serialized Form

<!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- -->

Constructor Summary
ServletException()
Constructs a new servlet exception. 构建一个新的servlet异常。
ServletException(Stringmessage)
Constructs a new servlet exception with the specified message. 构建一个指定信息的新的servlet异常。
ServletException(Stringmessage, ThrowablerootCause)
Constructs a new servlet exception when the servlet needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation, including a description message. 构建一个新的servlet异常,servlet需要时抛出,包含妨碍正常操作(包括描述信息)的根异常信息。
ServletException(ThrowablerootCause)
Constructs a new servlet exception when the servlet needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation. 构建一个新的servlet异常,servlet需要时抛出,包含妨碍正常操作的根异常信息。
<!-- ========== METHOD SUMMARY =========== --><!-- -->
Method Summary
Throwable getRootCause()
Returns the exception that caused this servlet exception. 返回引起servlet异常的异常。
<!-- -->
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
<!-- -->
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

<!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- -->

Constructor Detail
<!-- -->

ServletException

public ServletException()
Constructs a new servlet exception. 构建一个新的servlet异常。

<!-- -->

ServletException

public ServletException(Stringmessage)
Constructs a new servlet exception with the specified message. The message can be written to the server log and/or displayed for the user. 构建一个指定信息的新的servlet异常。该信息可以输出给 server日志或者显示给用户。
Parameters:
message - a String specifying the text of the exception message 指定异常信息文本的String

<!-- -->

ServletException

public ServletException(Stringmessage,
                        ThrowablerootCause)
Constructs a new servlet exception when the servlet needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation, including a description message. 构建一个新的servlet异常,servlet需要时抛出,包含妨碍正常操作(包括描述信息)的根异常信息。
Parameters:
message - a String containing the text of the exception message 包含异常信息文本的String
rootCause - the Throwable exception that interfered with the servlet's normal operation, making this servlet exception necessary 妨碍servlet正常操作的Throwable异常,必要时构建servlet异常

<!-- -->

ServletException

public ServletException(ThrowablerootCause)
Constructs a new servlet exception when the servlet needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation. The exception's message is based on the localized message of the underlying exception. 构建一个新的servlet异常,servlet需要时抛出,包含妨碍正常操作的根异常信息。该异常信息基于底层异常的本地化信息。

This method calls the getLocalizedMessage method on the Throwable exception to get a localized exception message. When subclassing ServletException, this method can be overridden to create an exception message designed for a specific locale. 该方法调用Throwable异常的getLocalizedMessage方法来获取本地化异常信息。 当子类化ServletException时,可以重写该方法来创建专为本地化设计的异常信息。

Parameters:
rootCause - the Throwable exception that interfered with the servlet's normal operation, making the servlet exception necessary 妨碍servlet正常操作的Throwable异常,必要时构建servlet异常
<!-- ============ METHOD DETAIL ========== --><!-- -->
Method Detail
<!-- -->

getRootCause

public Throwable getRootCause()
Returns the exception that caused this servlet exception. 返回引起servlet异常的异常。
Returns:
the Throwable that caused this servlet exception 引起servlet异常的Throwable
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== --><!-- -->
JavaTM 2 Platform
Ent. Ed. v1.4
<!-- ======== END OF BOTTOM NAVBAR ======= -->
Submit a bug or feature

Copyright 2003 Sun Microsystems, Inc. All rights reserved.

分享到:
评论

相关推荐

    javax.servlet.jar下载

    javax.servlet.ServletException.class javax.servlet.ServletRequest.class javax.servlet.ServletResponse.class javax.servlet.ServletConfig.class javax.servlet.ServletInputStream.class javax.servlet....

    servlet.jar javax.servlet.jar

    在使用servlet.jar和javax.servlet.jar时,开发者需要在Web应用的部署描述符(如web.xml)中声明Servlet实例,指定其类名、URL映射以及可能的初始化参数。例如: ```xml &lt;servlet&gt; &lt;servlet-name&gt;MyServlet&lt;/...

    sjsxp.jar(解决启动报错)

    启动报错:javax.servlet.ServletException:javax.xml.stream.FactoryConfigurationError: Provider for class javax.xml.stream.XMLInputFactory cannot be created。引入jar包解决问题

    javax.servlet API中文说明.docx

    ### javax.servlet API中文说明知识点详解 #### 一、概述 `javax.servlet` 包是 Java Web 开发的核心组件之一,提供了构建和管理 Servlet 的基础框架。该包定义了一系列的接口和类,使得开发者能够创建可扩展的...

    javax.servlet api参考(英文版)

    《javax.servlet API参考详解》 在Java Web开发中,`javax.servlet` API是核心部分,它为构建基于HTTP协议的Web应用程序提供了基础框架。本文将深入解析`javax.servlet` API,帮助开发者理解其核心概念、关键接口和...

    servlet-api-2.4.jar.zip

    javax.servlet.ServletException javax.servlet.http.HttpServlet javax.servlet.http.HttpSession javax.servlet.RequestDispatcher javax.servlet.SingleThreadModel javax.servlet.ServletInputStream javax....

    javax.servlet.http使用帮助.docx

    ### javax.servlet.http 使用详解 #### 一、概述 `javax.servlet.http` 是 Java Servlet 规范中的一个重要包,主要用于处理 HTTP 请求和响应。本篇文档将详细介绍 `javax.servlet.http` 包中的关键接口和类的功能...

    servlet2.4doc

    doFilter(ServletRequest, ServletResponse, FilterChain) - Method in interface javax.servlet.Filter The doFilter method of the Filter is called by the container each time a request/response pair is ...

    [课堂课件讲解]Java微服务实践-Spring Boot Web篇(下).pptx

    包括 javax.servlet.ServletConfig、javax.servlet.FilterConfig(since Servlet 2.3)、javax.servlet.ServletInputStream、javax.servlet.ServletOutputStream、javax.servlet.ServletException 等。 6. Servlet ...

    LoginServlet

    import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import ...

    Java-filter过滤器在项目开发中的应用.docx

    import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; public class Encode implements Filter { public void destroy() { // TODO Auto-...

    mvc实现操作

    import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import cn.bean.StudentDetail...

    JAVA SCM供应链项目代码

    import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import mmb.rec.sys.easyui.EasyuiComBoBoxBean; import mmb.rec.sys....

    Filter_Listener相信代码使用

    import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; /** * Servlet Filter implementation...

    Form表单上传文件(type="file")的使用

    import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet....

    Java filter过滤器在项目开发中的应用.doc

    import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; public class Encode implements Filter { public void destroy() {} public void ...

    比较简单的添加购物车,不过只有一个小程序

    import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet....

Global site tag (gtag.js) - Google Analytics