diff options
author | Greg Wilkins | 2010-07-22 06:33:54 +0000 |
---|---|---|
committer | Greg Wilkins | 2010-07-22 06:33:54 +0000 |
commit | 3ca0c6806a2c801b3bc485b8bc26cd24f5fae009 (patch) | |
tree | 780143bccf9e5e34829ffc978201377dc05c94b2 /jetty-webapp | |
parent | 5e49b01b931246ef41ad938a99ef30ac5ac17695 (diff) | |
download | org.eclipse.jetty.project-3ca0c6806a2c801b3bc485b8bc26cd24f5fae009.tar.gz org.eclipse.jetty.project-3ca0c6806a2c801b3bc485b8bc26cd24f5fae009.tar.xz org.eclipse.jetty.project-3ca0c6806a2c801b3bc485b8bc26cd24f5fae009.zip |
320073
support decorator cloning for WebAppContext templates
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2171 7e9141cc-0065-0410-87d8-b60c137991c4
Diffstat (limited to 'jetty-webapp')
-rw-r--r-- | jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java index 285d233043..3595f49d54 100644 --- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java +++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java @@ -168,11 +168,14 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL throw new IllegalArgumentException("template is started"); _scontext=new Context(); setErrorHandler(new ErrorPageErrorHandler()); + + //Make a new MetaData to hold descriptor and annotation metadata _metadata = template.getMetaData(); _configurations = new Configuration[]{new MetaDataConfiguration(template)}; - System.err.println("webapp "+getContextPath()+" @ "+hashCode()); + // TODO we need some better way to work out what attributes should be copied at this stage. + setAliases(template.isAliases()); setBaseResource(template.getBaseResource()); setClassLoader(template.getClassLoader()); // TODO maybe not share classloader? @@ -182,6 +185,10 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL setLogger(template.getLogger()); // TODO maybe not shared ??? setMaxFormContentSize(template.getMaxFormContentSize()); + Decorator decorator = template.getDecorator(); + if (decorator!=null) + setDecorator(decorator.cloneFor(this)); + Enumeration names=template.getAttributeNames(); while(names.hasMoreElements()) { |