Author: ivassile
Date: 2012-02-17 17:15:11 -0500 (Fri, 17 Feb 2012)
New Revision: 14325
Modified:
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/contexts/ServletLifecycle.java
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/core/ResourceLoader.java
branches/enterprise/JBPAPP_5_0/ui/src/main/java/org/jboss/seam/ui/facelet/ServletContextManager.java
Log:
JBPAPP-8150
Integrate changes 12127 and 11185
Modified:
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/contexts/ServletLifecycle.java
===================================================================
---
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/contexts/ServletLifecycle.java 2012-02-17
19:55:13 UTC (rev 14324)
+++
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/contexts/ServletLifecycle.java 2012-02-17
22:15:11 UTC (rev 14325)
@@ -160,7 +160,7 @@
WeakReference<ClassLoader> ref = new
WeakReference<ClassLoader>(Thread.currentThread().getContextClassLoader());
context.setAttribute("seam.context.classLoader",ref);
log.debug("Cached the context classloader in servletContext as
'seam.context.classLoader'");
-
+ context.setAttribute(SERVLET_CONTEXT_KEY, context);
servletContext = context;
Lifecycle.beginApplication( new ServletApplicationMap(context) );
}
Modified: branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/core/ResourceLoader.java
===================================================================
---
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/core/ResourceLoader.java 2012-02-17
19:55:13 UTC (rev 14324)
+++
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/core/ResourceLoader.java 2012-02-17
22:15:11 UTC (rev 14325)
@@ -52,12 +52,12 @@
public InputStream getResourceAsStream(String resource)
{
- return Resources.getResourceAsStream( resource,
ServletLifecycle.getServletContext() );
+ return Resources.getResourceAsStream( resource,
ServletLifecycle.getCurrentServletContext() );
}
public URL getResource(String resource)
{
- return Resources.getResource( resource, ServletLifecycle.getServletContext() );
+ return Resources.getResource( resource, ServletLifecycle.getCurrentServletContext()
);
}
/**
Modified:
branches/enterprise/JBPAPP_5_0/ui/src/main/java/org/jboss/seam/ui/facelet/ServletContextManager.java
===================================================================
---
branches/enterprise/JBPAPP_5_0/ui/src/main/java/org/jboss/seam/ui/facelet/ServletContextManager.java 2012-02-17
19:55:13 UTC (rev 14324)
+++
branches/enterprise/JBPAPP_5_0/ui/src/main/java/org/jboss/seam/ui/facelet/ServletContextManager.java 2012-02-17
22:15:11 UTC (rev 14325)
@@ -30,9 +30,9 @@
public void create()
{
// TODO A bit of a hack, we should store the servlet context properly
- if (ServletLifecycle.getServletContext() != null)
+ if (ServletLifecycle.getCurrentServletContext() != null)
{
- servletContext = ServletLifecycle.getServletContext();
+ servletContext = ServletLifecycle.getCurrentServletContext();
}
else
{
Show replies by date