Class JspViewHandler
java.lang.Object
org.apache.ofbiz.webapp.view.AbstractViewHandler
org.apache.ofbiz.ecommerce.webapp.view.JspViewHandler
- All Implemented Interfaces:
ViewHandler
JspViewHandler - Java Server Pages View Handler
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
init
(ServletContext context) Initializes the handler.prepareViewContext
(HttpServletRequest request, HttpServletResponse response, ConfigXMLReader.ViewMap viewMap) Before call the render, this function have to purpose to analyse, secure and prepare the contextvoid
render
(String name, String page, String contentType, String encoding, String info, HttpServletRequest request, HttpServletResponse response, Map<String, Object> context) Render the page.Methods inherited from class org.apache.ofbiz.webapp.view.AbstractViewHandler
getName, setName
-
Constructor Details
-
JspViewHandler
public JspViewHandler()
-
-
Method Details
-
init
Description copied from interface:ViewHandler
Initializes the handler. Since handlers use the singleton pattern this method should only be called the first time the handler is used.- Parameters:
context
- ServletContext This may be needed by the handler in order to lookup properties or XML definition files for rendering pages or handler options.- Throws:
ViewHandlerException
-
prepareViewContext
public Map<String,Object> prepareViewContext(HttpServletRequest request, HttpServletResponse response, ConfigXMLReader.ViewMap viewMap) Description copied from interface:ViewHandler
Before call the render, this function have to purpose to analyse, secure and prepare the context- Returns:
-
render
public void render(String name, String page, String contentType, String encoding, String info, HttpServletRequest request, HttpServletResponse response, Map<String, Object> context) throws ViewHandlerExceptionDescription copied from interface:ViewHandler
Render the page.- Parameters:
name
- The name of the view.page
- The source of the view; could be a page, url, etc depending on the type of handler.contentType
- An info string attached to this viewrequest
- The HttpServletRequest object used when requesting this page.response
- The HttpServletResponse object to be used to present the page.context
- The context prepare by the handler to run- Throws:
ViewHandlerException
-