Package org.apache.wicket.util.resource

Examples of org.apache.wicket.util.resource.UrlResourceStream


      try
      {
        final URL url = servletContext.getResource(path + pathname);
        if (url != null)
        {
          IResourceStream stream = new UrlResourceStream(url);
          if (stream == null)
          {
            log.error("ClassLoader problem: found the URL, but was unable to load it. URL="
                    + url.toExternalForm());
          }
View Full Code Here


    // load a template with a totally different name from this package using
    // this component's class loader
    final URL url = PageWithCustomLoading.class.getResource("CustomLoadedTemplate.html");
    if (url != null)
    {
      return new UrlResourceStream(url);
    }

    // no resource was not found
    return null;
  }
View Full Code Here

      try
      {
        final URL url = servletContext.getResource(path + pathname);
        if (url != null)
        {
          return new UrlResourceStream(url);
        }
      }
      catch (Exception ex)
      {
        // ignore, file couldn't be found
View Full Code Here

   *            the url
   * @return the imported contents
   */
  private final String importUrl(URL url)
  {
    UrlResourceStream resourceStream = new UrlResourceStream(url);
    String content = resourceStream.asString();
    return content;
  }
View Full Code Here

    // Try loading path using classloader
    final URL url = classLoader.getResource(path);
    if (url != null)
    {
      return new UrlResourceStream(url);
    }
    return null;
  }
View Full Code Here

    VelocityPanel velocityPanel = new VelocityPanel("velocityPanel",
        new Model(values))
    {
      protected IStringResourceStream getTemplateResource()
      {
        return new UrlResourceStream(this.getClass().getResource(
            "testWithMarkup.html"));
      }

      public boolean parseGeneratedMarkup()
      {
View Full Code Here

      private static final long serialVersionUID = 1L;

      @Override
      protected IResourceStream getTemplateResource()
      {
        return new UrlResourceStream(getClass().getResource("testWithMarkup.html"));
      }

      @Override
      public boolean parseGeneratedMarkup()
      {
View Full Code Here

TOP

Related Classes of org.apache.wicket.util.resource.UrlResourceStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.