Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
zhdtypt
提交
2bd8e507
Z
zhdtypt
项目概览
爱吃血肠
/
zhdtypt
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zhdtypt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
2bd8e507
编写于
8月 22, 2017
作者:
爱吃血肠
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
退出操作
上级
f1d46694
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
52 addition
and
1 deletion
+52
-1
WebRoot/WEB-INF/views/index/index.jsp
WebRoot/WEB-INF/views/index/index.jsp
+1
-1
src/main/java/com/newage/iep/action/account/LoginOutAction.java
...in/java/com/newage/iep/action/account/LoginOutAction.java
+45
-0
src/main/resources/struts-config/struts_website.xml
src/main/resources/struts-config/struts_website.xml
+6
-0
未找到文件。
WebRoot/WEB-INF/views/index/index.jsp
浏览文件 @
2bd8e507
...
...
@@ -56,7 +56,7 @@
<ul
class=
" nav navbar-nav navbar-right"
>
<li
id=
"search"
><a
href=
"#"
><span
class=
"glyphicon glyphicon-search "
></span></a></li>
<li
id=
"fullscreen"
><a
href=
"#"
><span
class=
"glyphicon glyphicon-resize-full "
></span></a></li>
<li><a
href=
"
#
"
><span
class=
"glyphicon glyphicon-log-out "
></span></a></li>
<li><a
href=
"
LoginOutAction_quit.do
"
><span
class=
"glyphicon glyphicon-log-out "
></span></a></li>
<li
id=
"msg"
>
<a
href=
"#"
data-container=
"body"
data-toggle=
"popover"
data-placement=
"bottom"
data-content=
"右侧的 Popover 中的一些内容"
data-animation=
"true"
>
...
...
src/main/java/com/newage/iep/action/account/LoginOutAction.java
0 → 100644
浏览文件 @
2bd8e507
package
com.newage.iep.action.account
;
import
com.opensymphony.xwork2.ActionSupport
;
import
org.apache.struts2.ServletActionContext
;
import
org.apache.struts2.interceptor.ServletRequestAware
;
import
org.apache.struts2.interceptor.ServletResponseAware
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpSession
;
/**
* Created by a1996_000 on 2017/8/22.
*/
/**
* 用户的退出操作
*/
public
class
LoginOutAction
extends
ActionSupport
implements
ServletRequestAware
,
ServletResponseAware
{
HttpServletRequest
request
;
HttpServletResponse
response
;
/**
* 用户退出操作
* @return
*/
public
String
quit
(){
//从session中获取邮箱信息
HttpSession
session
=
ServletActionContext
.
getRequest
().
getSession
();
String
email1
=
(
String
)
session
.
getAttribute
(
"user_email"
);
if
(
email1
!=
null
){
session
.
removeAttribute
(
"user_email"
);
}
return
"quit"
;
}
@Override
public
void
setServletRequest
(
HttpServletRequest
request
)
{
this
.
request
=
request
;
}
@Override
public
void
setServletResponse
(
HttpServletResponse
response
)
{
this
.
response
=
response
;
}
}
src/main/resources/struts-config/struts_website.xml
浏览文件 @
2bd8e507
...
...
@@ -118,5 +118,11 @@
<param
name=
"root"
>
result
</param>
</result>
</action>
<!--用户退出操作-->
<action
name=
"LoginOutAction_*"
class=
"com.newage.iep.action.account.LoginOutAction"
method=
"{1}"
>
<interceptor-ref
name=
"mydefault"
/>
<result
name=
"quit"
>
/WEB-INF/views/account/login.jsp
</result>
</action>
</package>
</struts>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录