org.rythmengine.web.servlet.RythmServlet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rythm-engine Show documentation
Show all versions of rythm-engine Show documentation
A strong typed high performance Java Template engine with .Net Razor like syntax
/*
* Copyright (C) 2013-2016 The Rythm Engine project
* for LICENSE and other details see:
* https://github.com/rythmengine/rythmengine
*/
package org.rythmengine.web.servlet;
import javax.servlet.http.HttpServlet;
/**
* A servlet to process Rythm templates. This is comparable to the
* the JspServlet for JSP-based applications.
*
* The servlet provides the following features:
*
* - renders Rythm templates
* - provides transparent access to the servlet request attributes,
* servlet session attributes and servlet context attributes by
* auto-searching them
* - logs to the logging facility of the servlet API
*
*
* RythmViewServlet supports the following configuration parameters
* in web.xml:
*
* - org.rythmengine.properties
* - Path and name of the Rythm configuration file. The path must be
* relative to the web application root directory. If this parameter
* is not present, Rythm will check for a properties file at
* '/WEB-INF/rythm.properties'. If no file is found there, then
* Rythm is initialized with the settings in the classpath at
* 'org.rythmengine.web.servlet.properties'.
* - org.rythmengine.tools.shared.config
* - By default, this is {@code true}. If set to {@code false}, then
* the {@link RythmView} used by this servlet will not be shared
* with {@link RythmViewFilter}s, other RythmViewServlets or
* {@link org.rythmengine.tools.view.jsp.RythmViewTag}s in the
* application.
* - org.rythmengine.tools.loadDefaults
* - By default, this is {@code true}. If set to {@code false}, then
* the default toolbox configuration will not be added to your (if any)
* custom configuration. NOTE: The default configuration will also be
* suppressed if you are using a deprecated toolbox.xml format and do not
* explicitly set this to {@code true}.
* - org.rythmengine.tools.cleanConfiguration
* - By default, this is {@code false}. If set to {@code true}, then
* then the final toolbox configuration (the combination of any custom
* one(s) provided by yourself and/or the default configuration(s))
* will have all invalid tools, properties, and/or data removed prior to
* configuring the ToolboxFactory for this servlet by a
* {@link org.rythmengine.tools.config.ConfigurationCleaner}
* - org.rythmengine.tools.bufferOutput
* - By default, the processed templates are merged directly into
* the {@link javax.servlet.http.HttpServletResponse}'s writer. If this parameter is
* set to {@code true}, then the output of the merge process will be
* buffered before being fed to the response. This allows the {@link #error}
* method to be overridden to return a "500 Internal Server Error" or
* at least not return any of the failed request content. Essentially,
* setting this to {@code true} degrades performance in order to enable
* a more "correct" error response"
*
*
*
*/
public class RythmServlet extends HttpServlet {
/**
* default serialVersion UID
*/
private static final long serialVersionUID = 1L;
}