Interface StaticFileHandler

All Superinterfaces:
Serializable
All Known Implementing Classes:
StaticFileServer

public interface StaticFileHandler extends Serializable
Handler for static files. The handler should be responsible in identifying and serving the static files, based on the servlet request.
Since:
1.3
Author:
Vaadin Ltd.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    serveStaticResource(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    Serves a static resource for the requested path if a resource can be found.
  • Method Details

    • serveStaticResource

      boolean serveStaticResource(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException
      Serves a static resource for the requested path if a resource can be found.
      Parameters:
      request - the request object to read from
      response - the response object to write to
      Returns:
      true if a file was served and the request has been handled, false otherwise.
      Throws:
      IOException - if the underlying servlet container reports an exception