文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > JspWriter与PrintWriter的关系
侵权投诉

JspWriter与PrintWriter的关系

out.print( "输出" );

out.write(""r"n</body>"r"n</head>"r"n</html>"r"n");

} catch (Throwable t) {

if (out != null && out.getBufferSize() != 0)

out.clearBuffer();

if (pageContext != null) pageContext.handlePageException(t);

} finally {

if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); }

}

}

从上面的代码中可以清晰的看到JSP内建的几个对象(out、request、response、session、pageContext、application、config、page)是怎么产生的,懂servlet的朋友一看就能明白。

下面重点理解一下out对象,它被声明为JspWriter类型,JspWriter是一个抽象类,在包javax.servlet.jsp中可以找到它的定义。

abstract public class javax.servlet.jsp.JspWriter extends java.io.Writer{

final public static int NO_BUFFER = 0;

final public static int DEFAULT_BUFFER = -1;

final public static int UNBOUNDED_BUFFER = -2;

protected int bufferSize;

protected Boolean autoFlush;

protected javax.servlet.jsp.JspWriter(int arg1, boolean arg2);

abstract public void newLine() throws IOException ;

abstract public void print(boolean arg0) throws IOException ;

abstract public void print(char arg0) throws IOException ;

abstract public void print(int arg0) throws IOException ;

abstract public void print(long arg0) throws IOException ;

abstract public void print(float arg0) throws IOException ;

abstract public void print(double arg0) throws IOException ;

abstract public void print(char<> arg0) throws IOException ;

abstract public void print(String arg0) throws IOException ;

abstract public void print(Object arg0) throws IOException ;

abstract public void println() throws IOException ;

abstract public void println(boolean arg0) throws IOException ;

abstract public void println(char arg0) throws IOException ;

abstract public void println(int arg0) throws IOException ;

abstract public void println(long arg0) throws IOException ;

abstract public void println(float arg0) throws IOException ;

abstract public void println(double arg0) throws IOException ;

abstract public void println(char<> arg0) throws IOException ;

abstract public void println(String arg0) throws IOException ;

abtract public void println(Object arg0) throws IOException ;

abstract public void clear() throws IOException ;

上一页第4页

你可能喜欢

热门文档

相关文档

  • JspWriter与PrintWriter的关系

    JspWriter与PrintWriter的关系_IT/计算机_专业资料。比较详细一.JspWriter 与 PrintWriter 的关系: 1.都是继承自 java.io.Writer 类. JspWriter 可以在 JSP 页面...

  • PrintWriter类入门

    PrintWriter类入门_计算机软件及应用_IT/计算机_专业资料。PrintWriter类入门1、PrintWriter 类(java.io 包中) PrintWriter 是一个非常实用的输出流。 (1) 构造...

  • forward和redirect的区别

    您可以使用page指令元素的autoFlush来设定JSP页面是否使用缓冲区自动清出功能,out(JspWriter)以一种方式与 HttpServletResponse的PrintWriter建立关系,两者之间的行为...

  • JSP第6讲

    处理中出现的异常 JspWriter类 JspWriter类 JspWriter类与PrintWriter类作用类似,主要用 JspWriter类与 类与PrintWriter类作用类似 类作用类似, 区别在于处理JSP缓冲区 ...

  • JSP培训

    JSP与Servlet的关系 JSP语法简单,可以方便地嵌入HTML之中,很容易加入动态 的部分...为了使response对象更有用,JspWriter是具有 缓存的PrintWriter。注意,可以通过指令...

  • jsp学习

    ? ? ? Tip:JSP九大隐式对象对应关系 ? ? ? ? ? ? ? ? ? request ...JspWriter相当于 一种带缓存功能的PrintWriter,设置JSP页面的page指令的 buffer...

  • 本课中

    下一步求值此标签体,但如果说明了SKIP_BODY 域常量则跳过 调用setBodyContent()方法,把此标签的输出 存储到称为JspWriter一个特殊的PrintWriter 下一步调用doAfter(...

  • 007_Jsp

    为了让response对象更为实用,out是带缓存功能 的PrintWriter,即JspWriter。 JSP允许通过page指令的buffer属性调整缓存的大 小,甚至允许关闭缓存。 out一般只在Script...

  • 第六章 JSP内置对象

    out是带缓存功能的PrintWriter,即JspWriter。 JSP允许通过page指令的buffer属性调整缓存的大小, 甚至允许关闭缓存。 ? out一般只在Scriptlet内使用,这是因为JSP表达式...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email