Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
e68f2f0a
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e68f2f0a
编写于
9月 06, 2010
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
removed unused HandlerExecutionChain caching
上级
45d9b0cb
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
7 addition
and
26 deletion
+7
-26
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/DispatcherPortlet.java
...va/org/springframework/web/portlet/DispatcherPortlet.java
+7
-26
未找到文件。
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/DispatcherPortlet.java
浏览文件 @
e68f2f0a
/*
/*
* Copyright 2002-20
09
the original author or authors.
* Copyright 2002-20
10
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -171,13 +171,6 @@ public class DispatcherPortlet extends FrameworkPortlet {
...
@@ -171,13 +171,6 @@ public class DispatcherPortlet extends FrameworkPortlet {
*/
*/
public
static
final
String
DEFAULT_VIEW_RENDERER_URL
=
"/WEB-INF/servlet/view"
;
public
static
final
String
DEFAULT_VIEW_RENDERER_URL
=
"/WEB-INF/servlet/view"
;
/**
* Request attribute to hold the currently chosen HandlerExecutionChain.
* Only used for internal optimizations.
*/
public
static
final
String
HANDLER_EXECUTION_CHAIN_ATTRIBUTE
=
DispatcherPortlet
.
class
.
getName
()
+
".HANDLER"
;
/**
/**
* Unlike the Servlet version of this class, we have to deal with the
* Unlike the Servlet version of this class, we have to deal with the
* two-phase nature of the portlet request. To do this, we need to pass
* two-phase nature of the portlet request. To do this, we need to pass
...
@@ -622,7 +615,7 @@ public class DispatcherPortlet extends FrameworkPortlet {
...
@@ -622,7 +615,7 @@ public class DispatcherPortlet extends FrameworkPortlet {
processedRequest
=
checkMultipart
(
request
);
processedRequest
=
checkMultipart
(
request
);
// Determine handler for the current request.
// Determine handler for the current request.
mappedHandler
=
getHandler
(
processedRequest
,
false
);
mappedHandler
=
getHandler
(
processedRequest
);
if
(
mappedHandler
==
null
||
mappedHandler
.
getHandler
()
==
null
)
{
if
(
mappedHandler
==
null
||
mappedHandler
.
getHandler
()
==
null
)
{
noHandlerFound
(
processedRequest
,
response
);
noHandlerFound
(
processedRequest
,
response
);
return
;
return
;
...
@@ -701,7 +694,7 @@ public class DispatcherPortlet extends FrameworkPortlet {
...
@@ -701,7 +694,7 @@ public class DispatcherPortlet extends FrameworkPortlet {
ModelAndView
mv
;
ModelAndView
mv
;
try
{
try
{
// Determine handler for the current request.
// Determine handler for the current request.
mappedHandler
=
getHandler
(
request
,
false
);
mappedHandler
=
getHandler
(
request
);
if
(
mappedHandler
==
null
||
mappedHandler
.
getHandler
()
==
null
)
{
if
(
mappedHandler
==
null
||
mappedHandler
.
getHandler
()
==
null
)
{
noHandlerFound
(
request
,
response
);
noHandlerFound
(
request
,
response
);
return
;
return
;
...
@@ -807,7 +800,7 @@ public class DispatcherPortlet extends FrameworkPortlet {
...
@@ -807,7 +800,7 @@ public class DispatcherPortlet extends FrameworkPortlet {
ModelAndView
mv
;
ModelAndView
mv
;
try
{
try
{
// Determine handler for the current request.
// Determine handler for the current request.
mappedHandler
=
getHandler
(
request
,
false
);
mappedHandler
=
getHandler
(
request
);
if
(
mappedHandler
==
null
||
mappedHandler
.
getHandler
()
==
null
)
{
if
(
mappedHandler
==
null
||
mappedHandler
.
getHandler
()
==
null
)
{
noHandlerFound
(
request
,
response
);
noHandlerFound
(
request
,
response
);
return
;
return
;
...
@@ -896,7 +889,7 @@ public class DispatcherPortlet extends FrameworkPortlet {
...
@@ -896,7 +889,7 @@ public class DispatcherPortlet extends FrameworkPortlet {
try
{
try
{
// Determine handler for the current request.
// Determine handler for the current request.
mappedHandler
=
getHandler
(
request
,
false
);
mappedHandler
=
getHandler
(
request
);
if
(
mappedHandler
==
null
||
mappedHandler
.
getHandler
()
==
null
)
{
if
(
mappedHandler
==
null
||
mappedHandler
.
getHandler
()
==
null
)
{
noHandlerFound
(
request
,
response
);
noHandlerFound
(
request
,
response
);
return
;
return
;
...
@@ -973,26 +966,14 @@ public class DispatcherPortlet extends FrameworkPortlet {
...
@@ -973,26 +966,14 @@ public class DispatcherPortlet extends FrameworkPortlet {
* @param cache whether to cache the HandlerExecutionChain in a request attribute
* @param cache whether to cache the HandlerExecutionChain in a request attribute
* @return the HandlerExceutionChain, or null if no handler could be found
* @return the HandlerExceutionChain, or null if no handler could be found
*/
*/
protected
HandlerExecutionChain
getHandler
(
PortletRequest
request
,
boolean
cache
)
throws
Exception
{
protected
HandlerExecutionChain
getHandler
(
PortletRequest
request
)
throws
Exception
{
HandlerExecutionChain
handler
=
(
HandlerExecutionChain
)
request
.
getAttribute
(
HANDLER_EXECUTION_CHAIN_ATTRIBUTE
);
if
(
handler
!=
null
)
{
if
(!
cache
)
{
request
.
removeAttribute
(
HANDLER_EXECUTION_CHAIN_ATTRIBUTE
);
}
return
handler
;
}
for
(
HandlerMapping
hm
:
this
.
handlerMappings
)
{
for
(
HandlerMapping
hm
:
this
.
handlerMappings
)
{
if
(
logger
.
isDebugEnabled
())
{
if
(
logger
.
isDebugEnabled
())
{
logger
.
debug
(
logger
.
debug
(
"Testing handler map ["
+
hm
+
"] in DispatcherPortlet with name '"
+
getPortletName
()
+
"'"
);
"Testing handler map ["
+
hm
+
"] in DispatcherPortlet with name '"
+
getPortletName
()
+
"'"
);
}
}
handler
=
hm
.
getHandler
(
request
);
HandlerExecutionChain
handler
=
hm
.
getHandler
(
request
);
if
(
handler
!=
null
)
{
if
(
handler
!=
null
)
{
if
(
cache
)
{
request
.
setAttribute
(
HANDLER_EXECUTION_CHAIN_ATTRIBUTE
,
handler
);
}
return
handler
;
return
handler
;
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录