public abstract class AbstractHttpServlet extends HttpServlet implements ResourceConnector
A base class dealing with common HTTP servlet API housekeeping aspects.
Also implements Groovy's ResourceConnector in a dynamic manner. It allows you to modify the resource name that is searched for with a replace all operation. See Pattern and Matcher for details. The servlet init parameter names are:
{
This implementation provides a verbosity flag switching log statements. The servlet init parameter name is:
verbose = false(default) | true
In order to support class-loading-troubles-debugging with Tomcat 4 or higher, you can log the class loader responsible for loading some classes. See GROOVY-861 for details. The servlet init parameter name is:
log.GROOVY861 = false(default) | true
If you experience class-loading-troubles with Tomcat 4 (or higher) or any other servlet container using custom class loader setups, you can fallback to use (slower) reflection in Groovy's MetaClass implementation. Please contact the dev team with your problem! Thanks. The servlet init parameter name is:
reflection = false(default) | true
Modifiers | Name | Description |
---|---|---|
static String |
CONTENT_TYPE_TEXT_HTML |
Content type of the HTTP response. |
static String |
INC_PATH_INFO |
Servlet API include key name: path_info |
static String |
INC_REQUEST_URI |
|
static String |
INC_SERVLET_PATH |
Servlet API include key name: servlet_path |
static String |
INIT_PARAM_RESOURCE_NAME_REGEX |
|
static String |
INIT_PARAM_RESOURCE_NAME_REGEX_FLAGS |
Constructor and description |
---|
AbstractHttpServlet() Initializes all fields with default values. |
Type Params | Return Type | Name and description |
---|---|---|
|
public URLConnection |
getResourceConnection(String name) Interface method for ResourceContainer. |
|
public void |
init(ServletConfig config) Overrides the generic init method to set some debug flags. |
Methods inherited from class | Name |
---|---|
class HttpServlet |
service, log, log, init, init, destroy, getInitParameterNames, getInitParameter, getServletContext, getServletName, getServletConfig, getServletInfo, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Content type of the HTTP response.
Servlet API include key name: path_info
Servlet API include key name: servlet_path
Interface method for ResourceContainer. This is used by the GroovyScriptEngine.
Overrides the generic init method to set some debug flags.
config
- the servlet configuration provided by the containerCopyright © 2003-2022 The Apache Software Foundation. All rights reserved.