title: Loading resources by spring in a websphere application server
body: <p>I have a web application running on websphere application server 8 (WAS). In web.xml i have:</p>
  
  <pre><code>&lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;classpath*:by/example/**/*-ctx.xml&lt;/param-value&gt;
  &lt;/context-param&gt;
  </code></pre>
  
  <p>Then when i deploy my app on WAS - It loads all my ctx files by urls with prefix "wsjar:file..." that is good.</p>
  
  <p>But when in my working app i try to use object of my application context to load resources like this: </p>
  
  <pre><code>applicationContext.getResource("classpath*:by/example/**/I-*.sql").getUrl()
  </code></pre>
  
  <p>It's throws exception that url incorrect - but if i add preffix "wsjar:", like  this:</p>
  
  <pre><code> applicationContext.getResource("wsjar:classpath*:by/example/**/I-*.sql").getUrl()
  </code></pre>
  
  <p>It works well. But i need to create universal system to load resources on different app servers, and servlets containers. In tomcat prefix not needed.</p>
  
  <p>How can i load resources in my app on WAS in the same way as ContextLoader via ContextLoaderListener load my ctx files without preffix "wsjar:"?</p>