HttpJspPage (Java EE 5)

Java EE API


javax.servlet.jsp Interface HttpJspPage

All Superinterfaces:
JspPage, Servlet

public interface HttpJspPage
extends JspPage

Implements: JspPage

HttpJspPage 接口描述使用 HTTP 协议时 JSP 页面实现类必须满足的交互。

该接口的行为等同于 JspPage 的行为,除了 _jspService 方法的签名,现在该签名在 Java 类型系统中是可表示的,并且显式包含在该接口中。

英文文档:

The HttpJspPage interface describes the interaction that a JSP Page Implementation Class must satisfy when using the HTTP protocol.

The behaviour is identical to that of the JspPage, except for the signature of the _jspService method, which is now expressible in the Java type system and included explicitly in the interface.

See Also:
JspPage

Method Summary
 void
 
Methods inherited from interface javax.servlet.jsp.JspPage
 
Methods inherited from interface javax.servlet.Servlet
 

Method Detail

public void _jspService(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
_jspService() 方法对应于 JSP 页面的正文。此方法由 JSP 容器自动定义,不得由 JSP 页面作者定义。

如果使用扩展属性指定了超类,则该超类可以选择在调用 _jspService() 方法之前(或之后)在其 service() 方法中执行某些操作。请参见 JSP 规范 JSP_Engine 章节中有关使用扩展属性的内容。

request 为 JSP 提供客户端请求信息。
response 协助 JSP 将响应发送到客户端。
ThrowsServletException: 如果 JSP 处理期间发生错误,则抛出该异常,并且容器应该采取适当操作清除请求。
Throwsjava.io.IOException: 如果写入此页面的响应时发生错误,则抛出该异常。

英文文档:

_jspService

void _jspService(HttpServletRequest request,
                 HttpServletResponse response)
                 throws ServletException,
                        IOException
The _jspService()method corresponds to the body of the JSP page. This method is defined automatically by the JSP container and should never be defined by the JSP page author.

If a superclass is specified using the extends attribute, that superclass may choose to perform some actions in its service() method before or after calling the _jspService() method. See using the extends attribute in the JSP_Engine chapter of the JSP specification.

Parameters:
request - Provides client request information to the JSP.
response - Assists the JSP in sending a response to the client.
Throws:
ServletException - Thrown if an error occurred during the processing of the JSP and that the container should take appropriate action to clean up the request.
IOException - Thrown if an error occurred while writing the response for this page.


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!