incubator-ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject svn commit: r1176601 - /incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/VaadinResourceHandler.java
Date Tue, 27 Sep 2011 20:33:51 GMT
Author: pauls
Date: Tue Sep 27 20:33:51 2011
New Revision: 1176601

URL: http://svn.apache.org/viewvc?rev=1176601&view=rev
Log:
Use the bundle to look-up resources

Modified:
    incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/VaadinResourceHandler.java

Modified: incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/VaadinResourceHandler.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/VaadinResourceHandler.java?rev=1176601&r1=1176600&r2=1176601&view=diff
==============================================================================
--- incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/VaadinResourceHandler.java
(original)
+++ incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/VaadinResourceHandler.java
Tue Sep 27 20:33:51 2011
@@ -28,10 +28,12 @@ import javax.servlet.http.HttpServletRes
 import org.osgi.service.http.HttpContext;
 import org.osgi.service.http.HttpService;
 import org.osgi.service.http.NamespaceException;
+import org.osgi.framework.*;
 
 public class VaadinResourceHandler {
     private volatile HttpService m_http;
     private HttpContext m_context;
+	private BundleContext m_bundleContext;
     
     public void start() {
         m_context = m_http.createDefaultHttpContext();
@@ -58,9 +60,9 @@ public class VaadinResourceHandler {
                     if (!name.startsWith("/")) {
                         name = "/" + name;
                     }
-                    if (name.startsWith(prefix)) {
+					if (name.startsWith(prefix)) {
                     	String originalName = name.replace("/ace/", "/reindeer/");
-                        resource = getClass().getResource(originalName);
+                        resource = m_bundleContext.getBundle().getEntry(originalName);
                         if (resource == null) {
                             // try to find the resource in the Vaadin bundle instead
                             resource = com.vaadin.Application.class.getResource(originalName);



Mime
View raw message