当前位置:网站首页>9-WebUtil工具类.md
9-WebUtil工具类.md
2022-08-03 00:34:00 【张 邵】
WebUtils
package com.zs.utils.web;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
public class WebUtils
{
/**
* 将字符串渲染到客户端
*
* @param response 渲染对象
* @param string 待渲染的字符串
* @return null
*/
public static String renderString(HttpServletResponse response, String string) {
try
{
response.setStatus(200);
response.setContentType("application/json");
response.setCharacterEncoding("utf-8");
response.getWriter().print(string);
}
catch (IOException e)
{
e.printStackTrace();
}
return null;
}
}
边栏推荐
- 2022 开放原子全球开源峰会 | 麒麟信安携手openEuler助力开源产业繁荣发展
- async-await
- 心电记录电路设计(框图/波形以及信号放大器的选择)
- vue3的keepAlive缓存组件
- 2022 Shandong International Youth Eye Health Industry Exhibition, Vision Health Exhibition, Optometry Exhibition
- alibaba数据同步组件canal的实践整理
- 优秀论文以及思路分析01
- 精心整理16条MySQL使用规范,减少80%问题,推荐分享给团队
- 作业8.2 线程同步互斥机制——互斥锁
- 智能合约安全-可重入攻击(SW107-Reentrancy)
猜你喜欢
随机推荐
【QT】自定义工程封装成DLL并如何调用(带ui界面的)
Moco of Mock tools use tutorial
做快乐的事情
2022/8/2 考试总结
微信小程序--》条件与列表渲染以及WXSS模板样式
.NET深入解析LINQ框架(四:IQueryable、IQueryProvider接口详解)
稳压电源: 电路图及类型
npm运行项目dependencies were not found: core-js/modules/es6.array.fill
一套开源的可快速搭建自己的物联网/智能家居系统源码
【深度学习】基于tensorflow的小型物体识别训练(数据集:CIFAR-10)
async-await
js显示隐藏手机号
flutter 时间戳转日期
flutter空安全问题,平时用到的数据一定要注意
Jmeter二次开发实现rsa加密
2022 Shandong International Youth Eye Health Industry Exhibition, Vision Health Exhibition, Optometry Exhibition
PAT甲级 1051 Pop Sequence
【MySQL —— 数据库约束】
flutter 每个要注意的点
【遥控器开发基础教程5】疯壳·开源编队无人机-SPI(2.4G 双机通信)