java 用ajax java后台传回值
阿里云国内75折 回扣 微信号:monov8 |
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6 |
用ajax java后台传回值,包括传json
public static final void sendAsJson(HttpServletResponse response, String str)
{
response.setContentType("application/json;charset=UTF-8");
if (null != str)
try {
response.getWriter().write(str);
} catch (IOException e) {
e.printStackTrace();
}
}
public static final void sendAsText(HttpServletResponse response, String str)
{
response.setContentType("text/html;charset=UTF-8");
if (null != str)
try {
response.getWriter().write(str);
} catch (IOException e) {
e.printStackTrace();
}
}
阿里云国内75折 回扣 微信号:monov8 |
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6 |