当前位置:网站首页>JSP built-in object out object function introduction
JSP built-in object out object function introduction
2022-08-02 00:18:00 【qq_25073223】
From:
Introduction to the function of the JSP built-in object out object
The following describes a brief description of the functions of the JSP built-in object out, as follows:
The function of the out object:output character stream to JSP page,It can convert dynamic content into html form and display it to the userNotes: 1. The out object is an instantiated object of the javax.servlet.jsp.JspWriter class. We can use the pageContext.getOut() method to get the out object 2.Using the <%=%> method to output is more convenient than out.println(), so we should try to use the <%=%> method to reduce the use of out objectsThe method of JSP built-in object out
| public abstract void clear() | Clear buffer contents, do not send data to client |
| public abstract void clearBuffer() | Clear the buffer after sending the data to the client |
| public abstarct void close() | Closes the output stream. |
| public abstract void flush() | The data in the output buffer. |
| public int getBufferSize() | Get the size of the buffer.The size of the buffer can be set with <%@ page buffer=size %> |
| public abstract int getRemainning() | Get the size of the remaining buffer space |
| public boolean isAutoFlush() | Get the AutoFlush value set with <%@ page is AutoFlush="true/false"%> |
| public abstract void newLine() | Output a newline character, newline |
| public abstract void print() | Display content of various data types |
| public abstract void println() | Separate lines to display content of various data types |
Example
<%@ page language="Java" import="java.util.*" pageEncoding="GB2312"%>Test Page <%int all=out.getBufferSize();//Get the buffer sizeint remain=out.getRemaining();//Get the remaining buffer sizeint use=all-remain;//The size of the buffer usedout.println("Output information---use buffer size"+use);%>
边栏推荐
猜你喜欢

当奈飞的NFT忘记了Web2的业务安全

【解决】win10下emqx启动报错Unable to load emulator DLL、node.db_role = EMQX_NODE__DB_ROLE = core

链上治理为何如此重要,波卡Gov 2.0又会如何引领链上治理的发展?

When Netflix's NFTs Forget Web2 Business Security
![[Headline] Written test questions - minimum stack](/img/67/08f2be8afc780e3848371a1b5e04db.png)
[Headline] Written test questions - minimum stack

一篇永久摆脱Mysql时区错误问题,idea数据库可视化插件配置

Quick solution for infix to suffix and prefix expressions

Redis-消息发布订阅

控制电机的几种控制电路原理图

Using the "stack" fast computing -- reverse polish expression
随机推荐
JSP如何使用page指令让JSP文件支持中文编码呢?
An interesting project--Folder comparison tool (1)
els block deformation
ROS dynamic parameters
好好活就是做有意义的事,有意义的事就是好好活
GetHashCode与Equals
JSP如何使用request获取当前访问者的真实IP呢?
easy-excel 解决百万数据导入导出,性能很强
[Headline] Written test questions - minimum stack
mysql8安装make报错如何解决
短视频SEO优化教程 自媒体SEO优化技巧方法
els strip deformation
Multi-feature fusion face detection based on attention mechanism
JSP Taglib指令具有什么功能呢?
链上治理为何如此重要,波卡Gov 2.0又会如何引领链上治理的发展?
短视频SEO搜索运营获客系统功能介绍
零基础如何学习单片机,一位入门者的进阶路径,可参考
Quick solution for infix to suffix and prefix expressions
Detailed explanation of Zadig's self-testing and tuning environment technical solution for developers
在不完全恢复、控制文件被创建或还原后,必须使用 RESETLOGS 打开数据库,解释 RESETLOGS.