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, service
public 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.HttpServlet
javax.servlet.ServletException
IOException
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
protected 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.ServletException
IOException
protected JellyContext createContext(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
req
- res
- org.apache.velocity.servlet.VelocityServlet#createContext
protected 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
- MalformedURLException
org.apache.velocity.servlet.VelocityServlet#getTemplate
protected void runScript(URL script, JellyContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws IOException, UnsupportedEncodingException, JellyException
script
- context
- req
- res
- IOException
UnsupportedEncodingException
JellyException
org.apache.velocity.servlet.VelocityServlet#mergeTemplate
protected 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.ServletException
IOException
Copyright © 2014 Apache Software Foundation. All rights reserved.