title: getContextClassLoader().getResource("") return null on Weblogic while return path value on JBoss
body: <p>Our team make migration of app from JBoss 4.2 to Weblogic 10.3.4. </p>
  
  <p>There is some logic in application that requires to know ear file name. For this purpose uses code below: </p>
  
  <pre><code>URL url = Thread.currentThread().getContextClassLoader().getResource("");
  </code></pre>
  
  <p>This code is executing during deploy phase during Spring initialization.</p>
  
  <p>And on JBoss this works fine but on Weblogic <code>getResource("")</code> return <code>null</code> in this case.</p>
  
  <p><strong>So my question is why this does not work in Weblogic?</strong></p>
  
  <hr>
  
  <p>Additionaly I've created small test.jsp pages with only few lines of code that return value of <code>Thread.currentThread().getContextClassLoader().getResource("")</code> and this works on Weblogic. So I made small table to show this situation in more clear way:</p>
  
  <pre>
  +----------+-------------+------------------------------+
  |          | on JSP page | during spring initialization |
  +----------+-------------+------------------------------+
  | JBoss    | works       | works                        |
  | Weblogic | works       | returns null                 |
  +----------+-------------+------------------------------+
  </pre>
  
  <p>Structure of application is next. <code>getResource("")</code> code is placed inside <code>my.jar</code>:</p>
  
  <pre><code>my.ear
  |
  +-my.war
    |
    +-WEB-INF
    | |
    | +-lib
    |   |
    |   +-my.jar
    |   +-org.springframework.aop-3.0.5.RELEASE.jar
    |   +-org.springframework.beans-3.0.5.RELEASE.jar
    |   +-org.springframework.context.support-3.0.5.RELEASE.jar
    |   +-org.springframework.context-3.0.5.RELEASE.jar
    |   +-org.springframework.core-3.0.5.RELEASE.jar
    |   +-other jars
    |
    +-test.jsp
    +-jsp pages    
  </code></pre>