Class View

    • Field Detail


        public static final String DEFAULT_MODEL_NAME
        If left unspecified, the default name of the model in the request attributes
        See Also:
        Constant Field Values
    • Constructor Detail

      • View

        public View​(String path)
        Creates a view without a model.
        path - will be dispatched to using the servlet container; it should have a leading /.
    • Method Detail

      • getPath

        public String getPath()
      • getModelName

        public String getModelName()
      • getModel

        public Object getModel()
      • render

        public void render​(jakarta.servlet.http.HttpServletRequest request,
                           jakarta.servlet.http.HttpServletResponse response)
                    throws IOException,
        Sets up the model in the request attributes, creates a dispatcher, and forwards the request.
        Specified by:
        render in interface Renderable
        request - http request
        response - http response
        IOException - if I/O error occurred
        jakarta.servlet.ServletException - if servlet error occurred - if application error occurred