public class JellyServlet
extends javax.servlet.http.HttpServlet
| Modifier and Type | Field and Description |
|---|---|
static String |
REQUEST
The HTTP request object context key.
|
static String |
RESPONSE
The HTTP response object context key.
|
| Constructor and Description |
|---|
JellyServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected JellyContext |
createContext(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) |
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
doRequest(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Handles all requests
|
protected void |
error(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Exception cause)
Invoked when there is an error thrown in any part of doRequest() processing.
|
protected URL |
getScript(javax.servlet.http.HttpServletRequest req)
Either use the query parameter "script", or the URI itself
to denote the script to run.
|
protected void |
runScript(URL script,
JellyContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, servicepublic static final String REQUEST
public static final String RESPONSE
protected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected void doRequest(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
IOException
req - HttpServletRequest object containing client requestres - HttpServletResponse object for the responsejavax.servlet.ServletExceptionIOExceptionprotected JellyContext createContext(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
req - res - org.apache.velocity.servlet.VelocityServlet#createContextprotected URL getScript(javax.servlet.http.HttpServletRequest req) throws MalformedURLException
Either use the query parameter "script", or the URI itself to denote the script to run.
Example: script=index.jelly or http://localhost:8080/foo/index.jelly.
req - MalformedURLExceptionorg.apache.velocity.servlet.VelocityServlet#getTemplateprotected void runScript(URL script, JellyContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws IOException, UnsupportedEncodingException, JellyException
script - context - req - res - IOExceptionUnsupportedEncodingExceptionJellyExceptionorg.apache.velocity.servlet.VelocityServlet#mergeTemplateprotected void error(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Exception cause)
throws javax.servlet.ServletException,
IOException
request - original HttpServletRequest from servlet container.response - HttpServletResponse object from servlet container.cause - Exception that was thrown by some other part of process.javax.servlet.ServletExceptionIOExceptionCopyright © 2012 Apache Software Foundation. All Rights Reserved.