org.tinygroup.weblayer.webcontext.setlocacle
接口 SetLocaleWebContext

所有超级接口:
org.tinygroup.context.BaseContext, org.tinygroup.context.Context, WebContext
所有已知实现类:
SetLocaleWebContextImpl

public interface SetLocaleWebContext
extends WebContext

实现了Servlet 2.4规范中的response的方法。包括:

设置区域和编码字符集。包括:

作者:
renhui

字段摘要
static String CHARSET_DEFAULT
          默认的charset。
static String INPUT_CHARSET_PARAM_DEFAULT
           
static String LOCALE_DEFAULT
          默认的locale。
static String OUTPUT_CHARSET_PARAM_DEFAULT
           
static String PARAMETER_KEY_DEFAULT
          用来设置locale的parameter key的名称。
static String PARAMETER_SET_TO_DEFAULT_VALUE
           
static String SESSION_KEY_DEFAULT
          用来保存locale的session key的名称。
 
方法摘要
 String getResponseContentType()
          取得content type。
 void setResponseCharacterEncoding(String charset)
          设置response输出字符集。
 void setResponseContentType(String contentType, boolean appendCharset)
          设置content type。
 
从接口 org.tinygroup.weblayer.WebContext 继承的方法
getObject, getRequest, getResponse, getServletContext, getWrappedWebContext, init, setObject, setRequest, setResponse, setServletContext
 
从接口 org.tinygroup.context.Context 继承的方法
clearSubContext, createSubContext, get, getParent, getSubContext, getSubContextMap, put, putSubContext, remove, removeSubContext, setParent
 
从接口 org.tinygroup.context.BaseContext 继承的方法
clear, exist, get, get, getItemMap, put, remove, renameKey, size
 

字段详细信息

INPUT_CHARSET_PARAM_DEFAULT

static final String INPUT_CHARSET_PARAM_DEFAULT
另请参见:
常量字段值

OUTPUT_CHARSET_PARAM_DEFAULT

static final String OUTPUT_CHARSET_PARAM_DEFAULT
另请参见:
常量字段值

SESSION_KEY_DEFAULT

static final String SESSION_KEY_DEFAULT
用来保存locale的session key的名称。

另请参见:
常量字段值

PARAMETER_KEY_DEFAULT

static final String PARAMETER_KEY_DEFAULT
用来设置locale的parameter key的名称。

另请参见:
常量字段值

PARAMETER_SET_TO_DEFAULT_VALUE

static final String PARAMETER_SET_TO_DEFAULT_VALUE
另请参见:
常量字段值

LOCALE_DEFAULT

static final String LOCALE_DEFAULT
默认的locale。

另请参见:
常量字段值

CHARSET_DEFAULT

static final String CHARSET_DEFAULT
默认的charset。

另请参见:
常量字段值
方法详细信息

getResponseContentType

String getResponseContentType()
取得content type。

返回:
content type,包括charset的定义

setResponseContentType

void setResponseContentType(String contentType,
                            boolean appendCharset)
设置content type。 如果content type不包含charset,并且 getCharacterEncoding被设置,则加上charset标记。

如果appendCharsetfalse,则content type中将不包含charset标记。

参数:
contentType - content type
appendCharset - 输出字符集

setResponseCharacterEncoding

void setResponseCharacterEncoding(String charset)
设置response输出字符集。注意,此方法必须在第一次getWriter之前执行。

参数:
charset - 输出字符集,如果charset为null ,则从contentType中删除charset标记


Copyright © 2006–2013 开源组织. All rights reserved.