|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.agila.impl.servlet.ActionServlet
org.apache.agila.impl.servlet.VelocityActionServlet
public abstract class VelocityActionServlet
Standard riff ont he actionservlet idea
Nested Class Summary | |
---|---|
class |
VelocityActionServlet.ServletAppContext
little wrapper class to safely pass the ServletContext to the loader |
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_PROPS
|
static java.lang.String |
HTTP_ACTION_VERB
|
static java.lang.String |
SERVLET_KEY
|
static java.lang.String |
TEMPLATE_PATH_KEY
|
Constructor Summary | |
---|---|
VelocityActionServlet()
|
Method Summary | |
---|---|
void |
debug(java.lang.String msg)
debug messages |
void |
debug(java.lang.String msg,
java.lang.Throwable e)
|
void |
defaultAction(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Implement this to make our parent happy |
abstract void |
defaultAction(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
org.apache.velocity.VelocityContext ctx)
Abstract method to be implemented by children, called when there is no action specified |
void |
error(java.lang.String msg)
error message |
void |
error(java.lang.String msg,
java.lang.Throwable e)
|
protected void |
errorPage(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
|
void |
fatal(java.lang.String msg)
fatal message |
void |
fatal(java.lang.String msg,
java.lang.Throwable e)
|
protected java.lang.String |
getActionVerb()
|
protected java.lang.String |
getInitParameter(java.lang.String key,
java.lang.String defaultValue)
|
protected java.lang.String |
getTemplatePathPrefix()
|
abstract java.lang.String |
getTemplateRoot()
Return the root of template path. |
protected org.apache.velocity.VelocityContext |
getVelocityContext(javax.servlet.http.HttpServletRequest req)
|
protected org.apache.velocity.app.VelocityEngine |
getVelocityEngine()
|
void |
info(java.lang.String msg)
|
void |
info(java.lang.String msg,
java.lang.Throwable e)
|
void |
init()
|
protected boolean |
renderTemplate(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
java.lang.String template)
|
protected boolean |
renderTemplate(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
org.apache.velocity.VelocityContext vc,
java.lang.String template)
|
void |
service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Service routine to dispatch via action verb. |
void |
trace(java.lang.String msg)
trace messages |
void |
trace(java.lang.String msg,
java.lang.Throwable e)
|
void |
unknownAction(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Implement this to make our parent happy |
abstract void |
unknownAction(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
org.apache.velocity.VelocityContext ctx)
Abstract method to be implemented by children, calle when the action specified is not found |
void |
warn(java.lang.String msg)
warning message |
void |
warn(java.lang.String msg,
java.lang.Throwable e)
|
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TEMPLATE_PATH_KEY
public static final java.lang.String SERVLET_KEY
public static final java.lang.String DEFAULT_PROPS
public static final java.lang.String HTTP_ACTION_VERB
Constructor Detail |
---|
public VelocityActionServlet()
Method Detail |
---|
public void init() throws javax.servlet.ServletException
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public abstract java.lang.String getTemplateRoot()
public void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, java.io.IOException
service
in class ActionServlet
req
- res
-
javax.servlet.ServletException
java.io.IOException
public abstract void defaultAction(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, org.apache.velocity.VelocityContext ctx) throws javax.servlet.ServletException, java.io.IOException
req
- res
-
javax.servlet.ServletException
java.io.IOException
public abstract void unknownAction(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, org.apache.velocity.VelocityContext ctx) throws javax.servlet.ServletException, java.io.IOException
req
- res
-
javax.servlet.ServletException
java.io.IOException
public final void defaultAction(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException
defaultAction
in class ActionServlet
req
- res
-
javax.servlet.ServletException
public final void unknownAction(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException
unknownAction
in class ActionServlet
req
- res
-
javax.servlet.ServletException
protected java.lang.String getActionVerb()
getActionVerb
in class ActionServlet
protected org.apache.velocity.app.VelocityEngine getVelocityEngine()
protected java.lang.String getInitParameter(java.lang.String key, java.lang.String defaultValue)
public void info(java.lang.String msg)
public void info(java.lang.String msg, java.lang.Throwable e)
public void warn(java.lang.String msg)
public void warn(java.lang.String msg, java.lang.Throwable e)
public void error(java.lang.String msg)
public void error(java.lang.String msg, java.lang.Throwable e)
public void fatal(java.lang.String msg)
public void fatal(java.lang.String msg, java.lang.Throwable e)
public void debug(java.lang.String msg)
public void debug(java.lang.String msg, java.lang.Throwable e)
public void trace(java.lang.String msg)
public void trace(java.lang.String msg, java.lang.Throwable e)
protected org.apache.velocity.VelocityContext getVelocityContext(javax.servlet.http.HttpServletRequest req)
protected void errorPage(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
protected java.lang.String getTemplatePathPrefix()
protected boolean renderTemplate(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, java.lang.String template)
protected boolean renderTemplate(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, org.apache.velocity.VelocityContext vc, java.lang.String template)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |