Class FaviconHandler

java.lang.Object
com.vaadin.flow.server.communication.FaviconHandler
All Implemented Interfaces:
SessionlessRequestHandler, Serializable

public class FaviconHandler extends Object implements SessionlessRequestHandler
Handles the favicon request explicitly and return 404 for it.

It allows to not produce the same content for the favicon as for any other resource if servlet mapping is "/*". The favicon request does not need a session, so it is answered without looking one up or creating one.

For internal use only. May be renamed or removed in a future release.

Since:
1.0
Author:
Vaadin Ltd
See Also:
  • Constructor Details

    • FaviconHandler

      public FaviconHandler()
  • Method Details

    • handleRequest

      public boolean handleRequest(VaadinRequest request, VaadinResponse response)
      Description copied from interface: SessionlessRequestHandler
      Called for every request before the service looks up its session. If a response is written, this method should return true to indicate that no more request handlers should be invoked for the request.
      Specified by:
      handleRequest in interface SessionlessRequestHandler
      Parameters:
      request - the request to handle
      response - the response object to which a response can be written
      Returns:
      true if a response has been written and no further request handlers should be called, otherwise false