public class JellyServlet
extends javax.servlet.http.HttpServlet
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REQUEST
The HTTP request object context key.
|
static java.lang.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,
java.lang.Exception cause)
Invoked when there is an error thrown in any part of doRequest() processing.
|
protected java.net.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(java.net.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 java.lang.String REQUEST
public static final java.lang.String RESPONSE
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
protected void doRequest(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, java.io.IOException
req
- HttpServletRequest object containing client requestres
- HttpServletResponse object for the responsejavax.servlet.ServletException
java.io.IOException
protected JellyContext createContext(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
req
- res
- org.apache.velocity.servlet.VelocityServlet#createContext
protected java.net.URL getScript(javax.servlet.http.HttpServletRequest req) throws java.net.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
- java.net.MalformedURLException
org.apache.velocity.servlet.VelocityServlet#getTemplate
protected void runScript(java.net.URL script, JellyContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws java.io.IOException, java.io.UnsupportedEncodingException, JellyException
script
- context
- req
- res
- java.io.IOException
java.io.UnsupportedEncodingException
JellyException
org.apache.velocity.servlet.VelocityServlet#mergeTemplate
protected void error(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Exception cause) throws javax.servlet.ServletException, java.io.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
java.io.IOException
Copyright © 2012. All Rights Reserved.