congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
SimpleServletResource.getDescription
Code IndexAdd Tabnine to your IDE (free)

How to use
getDescription
method
in
leap.lang.servlet.SimpleServletResource

Best Java code snippets using leap.lang.servlet.SimpleServletResource.getDescription (Showing top 2 results out of 315)

origin: org.leapframework/leap-lang

/**
 * This implementation delegates to {@code ServletContext.getResourceAsStream},
 * but throws a FileNotFoundException if no resource found.
 * @see javax.servlet.ServletContext#getResourceAsStream(String)
 */
public InputStream getInputStream() throws IOException {
  InputStream is = this.servletContext.getResourceAsStream(this.path);
  if (is == null) {
    throw new FileNotFoundException("Could not open " + getDescription());
  }
  return is;
}
origin: org.leapframework/leap-lang

/**
 * This implementation delegates to {@code ServletContext.getResource},
 * but throws a FileNotFoundException if no resource found.
 * @see javax.servlet.ServletContext#getResource(String)
 */
@Override
public URL getURL() throws IOException {
  URL url = this.servletContext.getResource(this.path);
  if (url == null) {
    throw new FileNotFoundException(
        getDescription() + " cannot be resolved to URL because it does not exist");
  }
  return url;
}
leap.lang.servletSimpleServletResourcegetDescription

Javadoc

This implementation returns a description that includes the ServletContext resource location.

Popular methods of SimpleServletResource

  • <init>
    Create a new ServletContextResource.The Servlet spec requires that resource paths start with a slash

Popular in Java

  • Start an intent from android
  • compareTo (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (Timer)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now