org.tinygroup.weblayer.webcontext.setlocacle.impl
public class SetLocaleWebContextImpl extends AbstractWebContextWrapper implements SetLocaleWebContext
SetLocaleWebContext的实现。| Modifier and Type | Field and 描述 |
|---|---|
protected static org.tinygroup.logger.Logger |
log |
CHARSET_DEFAULT, INPUT_CHARSET_PARAM_DEFAULT, LOCALE_DEFAULT, OUTPUT_CHARSET_PARAM_DEFAULT, PARAMETER_KEY_DEFAULT, PARAMETER_SET_TO_DEFAULT_VALUE, SESSION_KEY_DEFAULT| Constructor and 描述 |
|---|
SetLocaleWebContextImpl(WebContext wrappedContext)
包装一个
RequestContext对象。 |
| Modifier and Type | Method and 描述 |
|---|---|
String |
getResponseContentType()
取得content type。
|
void |
prepare()
设置locale、输入charset、输出charset。
|
void |
setDefaultCharset(String defaultCharset) |
void |
setDefaultLocale(Locale defaultLocale) |
void |
setInputCharsetPattern(Pattern inputCharsetPattern) |
void |
setOutputCharsetPattern(Pattern outputCharsetPattern) |
void |
setOverriders(SetLocaleOverrider[] overriders) |
void |
setParamKey(String paramKey) |
void |
setResponseCharacterEncoding(String charset)
设置response输出字符集。
|
void |
setResponseContentType(String contentType,
boolean appendCharset)
设置content type。
|
void |
setSessionKey(String sessionKey) |
exist, existFromWrapperContext, get, getFromWrapperContext, getObject, getRequest, getResponse, getServletContext, getWrappedWebContext, getWrappedWebContext, init, isRequestFinished, putSubWebContext, setObject, setRequest, setResponse, setServletContextclear, clearSubContext, contain, containNodeMap, createSubContext, existNodeMap, findNodeMap, get, getParent, getSubContext, getSubContextMap, put, putContext, putSubContext, remove, removeSubContext, renameKey, renameKeyNodeMap, setParentget, getItemMap, put, putAll, remove, setItemMap, sizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetObject, getRequest, getResponse, getServletContext, getWrappedWebContext, init, isRequestFinished, setObject, setRequest, setResponse, setServletContextpublic SetLocaleWebContextImpl(WebContext wrappedContext)
RequestContext对象。wrappedContext - 被包装的RequestContextpublic void setInputCharsetPattern(Pattern inputCharsetPattern)
public void setOutputCharsetPattern(Pattern outputCharsetPattern)
public void setOverriders(SetLocaleOverrider[] overriders)
public void setDefaultLocale(Locale defaultLocale)
public void setDefaultCharset(String defaultCharset)
public void setSessionKey(String sessionKey)
public void setParamKey(String paramKey)
public String getResponseContentType()
getResponseContentType 接口 {1} 中的 {0} SetLocaleWebContextpublic void setResponseContentType(String contentType, boolean appendCharset)
getCharacterEncoding被设置,则加上charset标记。
如果appendCharset为false,则content
type中将不包含charset标记。
setResponseContentType 接口 {1} 中的 {0} SetLocaleWebContextcontentType - content typeappendCharset - 输出字符集public void setResponseCharacterEncoding(String charset)
getWriter之前执行。setResponseCharacterEncoding 接口 {1} 中的 {0} SetLocaleWebContextcharset - 输出字符集,如果charset为null ,则从contentType中删除charset标记public void prepare()
Copyright © 2006–2015 TinyGroup. All rights reserved.