Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Bartel2013-09-10 00:18:12 +0000
committerJan Bartel2013-09-10 00:18:12 +0000
commitc0f5c5a659cef7ebcf79df4c11d652ea06fafa83 (patch)
tree882059ae4d11840b9943472873f9d058ef09f6c6 /jetty-webapp
parent31ff31c8b1724ac9a2dc25111cd071a543ee77c4 (diff)
parentf85acc74375fab83d44166458d902037c05f89fb (diff)
downloadorg.eclipse.jetty.project-c0f5c5a659cef7ebcf79df4c11d652ea06fafa83.tar.gz
org.eclipse.jetty.project-c0f5c5a659cef7ebcf79df4c11d652ea06fafa83.tar.xz
org.eclipse.jetty.project-c0f5c5a659cef7ebcf79df4c11d652ea06fafa83.zip
Merge remote-tracking branch 'origin/master' into jetty-9.1
Conflicts: jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/WebAppProvider.java
Diffstat (limited to 'jetty-webapp')
-rw-r--r--jetty-webapp/src/main/java/org/eclipse/jetty/webapp/StandardDescriptorProcessor.java45
1 files changed, 36 insertions, 9 deletions
diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/StandardDescriptorProcessor.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/StandardDescriptorProcessor.java
index 20df5165ca..71d7fb5401 100644
--- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/StandardDescriptorProcessor.java
+++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/StandardDescriptorProcessor.java
@@ -653,16 +653,43 @@ public class StandardDescriptorProcessor extends IterativeDescriptorProcessor
// <tracking-mode>
// this is additive across web-fragments
Iterator iter = node.iterator("tracking-mode");
- Set<SessionTrackingMode> modes = new HashSet<SessionTrackingMode>();
- modes.addAll(context.getSessionHandler().getSessionManager().getEffectiveSessionTrackingModes());
- while (iter.hasNext())
- {
- XmlParser.Node mNode = (XmlParser.Node) iter.next();
- String trackMode = mNode.toString(false, true);
- modes.add(SessionTrackingMode.valueOf(trackMode));
+ if (iter.hasNext())
+ {
+ Set<SessionTrackingMode> modes = null;
+ Origin o = context.getMetaData().getOrigin("session.tracking-mode");
+ switch (o)
+ {
+ case NotSet://not previously set, starting fresh
+ case WebDefaults://previously set in web defaults, allow this descriptor to start fresh
+ {
+
+ modes = new HashSet<SessionTrackingMode>();
+ context.getMetaData().setOrigin("session.tracking-mode", descriptor);
+ break;
+ }
+ case WebXml:
+ case WebFragment:
+ case WebOverride:
+ {
+ //if setting from an override descriptor, start afresh, otherwise add-in tracking-modes
+ if (descriptor instanceof OverrideDescriptor)
+ modes = new HashSet<SessionTrackingMode>();
+ else
+ modes = new HashSet<SessionTrackingMode>(context.getSessionHandler().getSessionManager().getEffectiveSessionTrackingModes());
+ context.getMetaData().setOrigin("session.tracking-mode", descriptor);
+ break;
+ }
+ }
+
+ while (iter.hasNext())
+ {
+ XmlParser.Node mNode = (XmlParser.Node) iter.next();
+ String trackMode = mNode.toString(false, true);
+ modes.add(SessionTrackingMode.valueOf(trackMode));
+ }
+ context.getSessionHandler().getSessionManager().setSessionTrackingModes(modes);
}
- context.getSessionHandler().getSessionManager().setSessionTrackingModes(modes);
-
+
//Servlet Spec 3.0
//<cookie-config>

Back to the top