| org.apache.velocity.tools.view.servlet.VelocityViewServlet org.apache.velocity.tools.view.servlet.VelocityLayoutServlet
VelocityLayoutServlet | public class VelocityLayoutServlet extends VelocityViewServlet (Code) | | Extension of the VelocityViewServlet to perform "two-pass"
layout rendering and allow for a customized error screen.
For a brief user-guide to this, i suggest trying to track down
the VLS_README.txt file that hopefully made it into the docs
somewhere.
author: Nathan Bubna version: $Id: VelocityLayoutServlet.java 479724 2006-11-27 18:49:37Z nbubna $ |
DEFAULT_DEFAULT_LAYOUT | public static String DEFAULT_DEFAULT_LAYOUT(Code) | | The default filename for the servlet's default layout
|
DEFAULT_ERROR_TEMPLATE | public static String DEFAULT_ERROR_TEMPLATE(Code) | | The default error template's filename.
|
DEFAULT_LAYOUT_DIR | public static String DEFAULT_LAYOUT_DIR(Code) | | The default layout directory
|
KEY_ERROR_CAUSE | public static String KEY_ERROR_CAUSE(Code) | | The context key that holds the
Throwable that
broke the rendering of the requested screen.
|
KEY_ERROR_INVOCATION_EXCEPTION | public static String KEY_ERROR_INVOCATION_EXCEPTION(Code) | | The context key that holds the
MethodInvocationException that broke the rendering of the requested screen.
If this value is placed in the context, then $error_cause
will hold the error that this invocation exception is wrapping.
|
KEY_ERROR_STACKTRACE | public static String KEY_ERROR_STACKTRACE(Code) | | The context key that holds the stack trace of the error that
broke the rendering of the requested screen.
|
KEY_LAYOUT | public static String KEY_LAYOUT(Code) | | The context/parameter key used to specify an alternate
layout to be used for a request instead of the default layout.
|
KEY_SCREEN_CONTENT | public static String KEY_SCREEN_CONTENT(Code) | | The context key that will hold the content of the screen.
This key ($screen_content) must be present in the layout
template for the current screen to be rendered.
|
PROPERTY_DEFAULT_LAYOUT | final public static String PROPERTY_DEFAULT_LAYOUT(Code) | | The velocity.properties key for specifying the
servlet's default layout template's filename.
|
PROPERTY_ERROR_TEMPLATE | final public static String PROPERTY_ERROR_TEMPLATE(Code) | | The velocity.properties key for specifying the
servlet's error template.
|
PROPERTY_LAYOUT_DIR | final public static String PROPERTY_LAYOUT_DIR(Code) | | The velocity.properties key for specifying the
relative directory holding layout templates.
|
createContext | protected Context createContext(HttpServletRequest request, HttpServletResponse response)(Code) | | Overrides VelocityViewServlet to check the request for
an alternate layout
Parameters: request - client request Parameters: response - client response the Context to fill |
init | public void init(ServletConfig config) throws ServletException(Code) | | Initializes Velocity, the view servlet and checks for changes to
the initial layout configuration.
Parameters: config - servlet configuration parameters |
Methods inherited from org.apache.velocity.tools.view.servlet.VelocityViewServlet | protected Context createContext(HttpServletRequest request, HttpServletResponse response)(Code)(Java Doc) public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)(Java Doc) public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)(Java Doc) protected void doRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)(Java Doc) protected void error(HttpServletRequest request, HttpServletResponse response, Exception e) throws ServletException(Code)(Java Doc) protected String findInitParameter(ServletConfig config, String key)(Code)(Java Doc) protected Writer getResponseWriter(HttpServletResponse response) throws UnsupportedEncodingException, IOException(Code)(Java Doc) public Template getTemplate(String name) throws ResourceNotFoundException, ParseErrorException, Exception(Code)(Java Doc) public Template getTemplate(String name, String encoding) throws ResourceNotFoundException, ParseErrorException, Exception(Code)(Java Doc) protected VelocityEngine getVelocityEngine()(Code)(Java Doc) protected String getVelocityProperty(String key, String alternate)(Code)(Java Doc) protected Template handleRequest(HttpServletRequest request, HttpServletResponse response, Context ctx) throws Exception(Code)(Java Doc) public void init(ServletConfig config) throws ServletException(Code)(Java Doc) protected void initToolbox(ServletConfig config) throws ServletException(Code)(Java Doc) protected void initVelocity(ServletConfig config) throws ServletException(Code)(Java Doc) protected ExtendedProperties loadConfiguration(ServletConfig config) throws IOException(Code)(Java Doc) protected void mergeTemplate(Template template, Context context, HttpServletResponse response) throws ResourceNotFoundException, ParseErrorException, MethodInvocationException, IOException, UnsupportedEncodingException, Exception(Code)(Java Doc) protected void performMerge(Template template, Context context, Writer writer) throws ResourceNotFoundException, ParseErrorException, MethodInvocationException, Exception(Code)(Java Doc) protected void requestCleanup(HttpServletRequest request, HttpServletResponse response, Context context)(Code)(Java Doc) protected void setContentType(HttpServletRequest request, HttpServletResponse response)(Code)(Java Doc) protected void setVelocityEngine(VelocityEngine ve)(Code)(Java Doc)
|
|
|