Class VmServlet

    • Constructor Detail

      • VmServlet

        public VmServlet()
    • Method Detail

      • getVmReference

        public Object getVmReference​(String name,
                                     HttpServletRequest request)
        Access the object set in the velocity context for this name, if any.
        Parameters:
        name - The reference name.
        request - The request.
        Returns:
        The reference value object, or null if none
      • setVmReference

        public void setVmReference​(String name,
                                   Object value,
                                   HttpServletRequest request)
        Add a reference object to the velocity context by name - if it's not already defined
        Parameters:
        name - The reference name.
        value - The reference value object.
        request - The request.
      • setVmStdRef

        protected void setVmStdRef​(HttpServletRequest request,
                                   HttpServletResponse response)
        Add some standard references to the vm context.
        Parameters:
        request - The request.
        response - The response.
      • includeVm

        protected void includeVm​(String template,
                                 HttpServletRequest request,
                                 HttpServletResponse response)
                          throws ServletException
        Include the Velocity template, expanded with the current set of references
        Parameters:
        template - The path, relative to the webapp context, of the template file
        request - The render request.
        response - The render response.
        Throws:
        PortletException - if something goes wrong.
        ServletException
      • getActionURL

        protected ActionURL getActionURL​(HttpServletRequest request)
        Get a new ActionURL.
        Parameters:
        req - The current request.
        Returns:
        A new ActionURL.