code: public URL getResource(String uriInContext)
          throws MalformedURLException
      {        
          if (uriInContext==null || !uriInContext.startsWith("/"))
              throw new MalformedURLException(uriInContext);
          
          try{
              Resource resource = getHttpContext().getResource(uriInContext);
              if (resource!=null && resource.exists())
                  return resource.getURL();
          }
          catch(IllegalArgumentException e)
          {
              LogSupport.ignore(log,e);
          }
          catch(MalformedURLException e)
          {
              throw e;
          }
          catch(IOException e)
          {
              log.warn(LogSupport.EXCEPTION,e);
          }
          return null;
      }
docs: Get a Resource.
  If no resource is found, resource aliases are tried.
  @param uriInContext
  @return URL of the resource.
  @exception MalformedURLException