We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/** * 获取session属性信息中某个字段的值 * * @param key * 属性信息的key * @return String 属性信息的值value */ protected String getSessionAttribute(final String key) { return request.getSession().getAttributes().get(key); }
/** * 设置session属性信息中某个字段的值 * * @param key * 属性信息的key * @param value * 属性信息的值value */ protected void setSessionAttribute(final String key, final String value) { session.getAttributes().put(key, value); }
The text was updated successfully, but these errors were encountered:
/** * 清空session的属性信息 */ protected void clearSessionAttribute() { session.getAttributes().clear(); }
Sorry, something went wrong.
请问可以详细的描述一下么?
getSessionAttribute 是从 request.Session() 中获取 值,而 setSessionAttribute 是从 session中获取。 不是一个对象
getSessionAttribute 是获取request中的session属性;setSessionAttribute是向response中设置session
No branches or pull requests
/**
* 获取session属性信息中某个字段的值
*
* @param key
* 属性信息的key
* @return String 属性信息的值value
*/
protected String getSessionAttribute(final String key) {
return request.getSession().getAttributes().get(key);
}
The text was updated successfully, but these errors were encountered: