java.lang.Object
jakarta.servlet.GenericServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable, BasicUniversalConfig, DefaultConfig, DefaultHtmlConfig

public class FlavorsRest extends PetstoreConsolePage
Rendering flavors: the same pet list rendered by each of the petstore's view technologies, inside the console.

Html, Freemarker and Mustache are child resources, each serving its page at / and a chrome-less fragment at /fragment that the page's html card loads with src=. React is the standalone app at /petstore-ui, embedded in an iframe.

Example:

<@card id="flavor" title="Pets" src="/console/dev/flavors/mustache/fragment"/>

See Also:
  • Constructor Details

  • Method Details

    • index

      public SeeOther index(RestRequest req)
      Redirects to the first flavor.
      Parameters:
      req - The request.
      Returns:
      A 303 to html.
    • react

      public View react(RestRequest req)
      The React flavor page, from its builder twin on ?builder.
      Parameters:
      req - The request.
      Returns:
      The React flavor page.