public class ServletResponder extends Object
Constructor and Description |
---|
ServletResponder() |
Modifier and Type | Method and Description |
---|---|
static void |
addDispositionHeader(javax.servlet.http.HttpServletResponse resp,
String fileName,
String encoding,
boolean inline) |
static String |
buildTemplateHTML(IExtendedFormRequestContext ctx,
String msg) |
static String |
buildTemplateHTML(Locale locale,
String msg) |
static void |
redirect(javax.servlet.http.HttpServletResponse response,
String url) |
static void |
respond(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
IServletResponse responseData,
Locale locale) |
static void |
respondContent(javax.servlet.http.HttpServletResponse resp,
EMime mime,
String cont)
Setzt die Response-Header 'Content-Type' und 'Content-Length' und schreibt die übergebenen Daten in den Response.
|
static void |
respondContent(javax.servlet.http.HttpServletResponse resp,
EMime mime,
String cont,
String encoding) |
static void |
respondFile(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
byte[] data,
String fileName,
boolean inline) |
static void |
respondFile(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
byte[] data,
String fileName,
boolean inline,
String contentType) |
static void |
respondFile(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
byte[] data,
String fileName,
String encoding,
boolean inline,
String contentType) |
static void |
respondFile(javax.servlet.http.HttpServletResponse resp,
File file,
boolean inline) |
static void |
respondFile(javax.servlet.http.HttpServletResponse resp,
File file,
String fileName,
boolean inline) |
static void |
respondFile(javax.servlet.http.HttpServletResponse resp,
File file,
String fileName,
String encoding,
boolean inline) |
protected static void |
respondHTML(javax.servlet.http.HttpServletResponse response,
IServletResponse responseData) |
static void |
respondHTML(javax.servlet.http.HttpServletResponse response,
String html) |
static void |
respondJavaScript(javax.servlet.http.HttpServletResponse response,
String script) |
protected static void |
respondJSON(javax.servlet.http.HttpServletResponse response,
IServletResponse responseData) |
static void |
respondJSON(javax.servlet.http.HttpServletResponse resp,
com.alibaba.fastjson.JSONArray json) |
static void |
respondJSON(javax.servlet.http.HttpServletResponse resp,
com.alibaba.fastjson.JSONObject json) |
static void |
respondJSON(javax.servlet.http.HttpServletResponse resp,
String json) |
static void |
respondJSONError(javax.servlet.http.HttpServletResponse resp,
String msg,
int sc) |
static void |
respondJSONMessage(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
String string,
boolean success) |
static void |
respondPlainText(javax.servlet.http.HttpServletResponse response,
String text) |
static void |
respondStream(javax.servlet.http.HttpServletResponse resp,
InputStream is,
String fileName,
boolean inline) |
static void |
respondStream(javax.servlet.http.HttpServletResponse resp,
InputStream is,
String fileName,
String encoding,
boolean inline) |
protected static void |
respondTemplate(javax.servlet.http.HttpServletResponse response,
IServletResponse responseData,
Locale locale) |
protected static void |
respondXML(javax.servlet.http.HttpServletResponse response,
IServletResponse responseData) |
static void |
respondXML(javax.servlet.http.HttpServletResponse response,
String xml) |
static void |
writeSessionParameters(javax.servlet.http.HttpServletRequest request,
IServletResponse responseData) |
public static void respondContent(javax.servlet.http.HttpServletResponse resp, EMime mime, String cont)
CmnConst.DFLT_ENCODING
ermittelt.resp
- - Responsemime
- - Inhaltstypcont
- - zu schreibende DatenIOException
public static void respondContent(javax.servlet.http.HttpServletResponse resp, EMime mime, String cont, String encoding)
public static void respondFile(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, byte[] data, String fileName, boolean inline)
public static void respondFile(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, byte[] data, String fileName, boolean inline, String contentType)
public static void respondFile(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, byte[] data, String fileName, String encoding, boolean inline, String contentType)
public static void respondFile(javax.servlet.http.HttpServletResponse resp, File file, boolean inline)
public static void respondFile(javax.servlet.http.HttpServletResponse resp, File file, String fileName, boolean inline)
public static void respondFile(javax.servlet.http.HttpServletResponse resp, File file, String fileName, String encoding, boolean inline)
public static void respondStream(javax.servlet.http.HttpServletResponse resp, InputStream is, String fileName, boolean inline)
public static void respondStream(javax.servlet.http.HttpServletResponse resp, InputStream is, String fileName, String encoding, boolean inline)
public static void addDispositionHeader(javax.servlet.http.HttpServletResponse resp, String fileName, String encoding, boolean inline) throws UnsupportedEncodingException
UnsupportedEncodingException
public static void redirect(javax.servlet.http.HttpServletResponse response, String url) throws IOException
IOException
public static String buildTemplateHTML(IExtendedFormRequestContext ctx, String msg)
public static void respond(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, IServletResponse responseData, Locale locale) throws IOException
IOException
public static void writeSessionParameters(javax.servlet.http.HttpServletRequest request, IServletResponse responseData)
protected static void respondHTML(javax.servlet.http.HttpServletResponse response, IServletResponse responseData)
protected static void respondTemplate(javax.servlet.http.HttpServletResponse response, IServletResponse responseData, Locale locale)
protected static void respondJSON(javax.servlet.http.HttpServletResponse response, IServletResponse responseData)
protected static void respondXML(javax.servlet.http.HttpServletResponse response, IServletResponse responseData)
public static void respondHTML(javax.servlet.http.HttpServletResponse response, String html)
public static void respondPlainText(javax.servlet.http.HttpServletResponse response, String text)
public static void respondJavaScript(javax.servlet.http.HttpServletResponse response, String script)
public static void respondJSON(javax.servlet.http.HttpServletResponse resp, com.alibaba.fastjson.JSONObject json)
public static void respondJSON(javax.servlet.http.HttpServletResponse resp, com.alibaba.fastjson.JSONArray json)
public static void respondJSON(javax.servlet.http.HttpServletResponse resp, String json)
public static void respondXML(javax.servlet.http.HttpServletResponse response, String xml)
public static void respondJSONMessage(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, String string, boolean success)
public static void respondJSONError(javax.servlet.http.HttpServletResponse resp, String msg, int sc)
Copyright © 2019 XIMA MEDIA GmbH. All rights reserved.