|
||||||||||
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
com.opensymphony.webwork.views.freemarker.FreemarkerServlet
public class FreemarkerServlet
Field Summary | |
---|---|
protected freemarker.template.Configuration |
configuration
Deprecated. |
Constructor Summary | |
---|---|
FreemarkerServlet()
Deprecated. |
Method Summary | |
---|---|
protected freemarker.template.Configuration |
createConfiguration()
Deprecated. |
protected freemarker.template.TemplateModel |
createModel(freemarker.template.ObjectWrapper wrapper,
ServletContext servletContext,
HttpServletRequest request,
HttpServletResponse response)
Deprecated. |
protected Locale |
deduceLocale(String templatePath,
HttpServletRequest request,
HttpServletResponse response)
Deprecated. Returns the locale used for the Configuration.getTemplate(String, Locale) call. |
void |
doGet(HttpServletRequest request,
HttpServletResponse response)
Deprecated. |
void |
doPost(HttpServletRequest request,
HttpServletResponse response)
Deprecated. |
protected freemarker.template.ObjectWrapper |
getObjectWrapper()
Deprecated. This method is called from process() to obtain the FreeMarker object wrapper object that this result will use for adapting objects into template models.. |
void |
init()
Deprecated. |
protected void |
postTemplateProcess(HttpServletRequest request,
HttpServletResponse response,
freemarker.template.Template template,
freemarker.template.TemplateModel data)
Deprecated. Called after the execution returns from template.process(). |
protected boolean |
preTemplateProcess(HttpServletRequest request,
HttpServletResponse response,
freemarker.template.Template template,
freemarker.template.TemplateModel data)
Deprecated. Called before the execution is passed to template.process(). |
protected String |
requestUrlToTemplatePath(HttpServletRequest request)
Deprecated. Maps the request URL to a template path that is passed to Configuration.getTemplate(String, Locale) . |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, 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 |
---|
protected freemarker.template.Configuration configuration
Constructor Detail |
---|
public FreemarkerServlet()
Method Detail |
---|
public final void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doGet
in class HttpServlet
ServletException
IOException
public final void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doPost
in class HttpServlet
ServletException
IOException
public void init() throws ServletException
init
in class GenericServlet
ServletException
protected freemarker.template.ObjectWrapper getObjectWrapper()
protected freemarker.template.Configuration createConfiguration() throws freemarker.template.TemplateException
freemarker.template.TemplateException
protected freemarker.template.TemplateModel createModel(freemarker.template.ObjectWrapper wrapper, ServletContext servletContext, HttpServletRequest request, HttpServletResponse response) throws freemarker.template.TemplateModelException
freemarker.template.TemplateModelException
protected Locale deduceLocale(String templatePath, HttpServletRequest request, HttpServletResponse response)
Configuration.getTemplate(String, Locale)
call.
The base implementation simply returns the locale setting of the
configuration. Override this method to provide different behaviour, i.e.
to use the locale indicated in the request.
protected void postTemplateProcess(HttpServletRequest request, HttpServletResponse response, freemarker.template.Template template, freemarker.template.TemplateModel data) throws ServletException, IOException
request
- the actual HTTP requestresponse
- the actual HTTP responsetemplate
- the template that was executeddata
- the data that was passed to the template
ServletException
IOException
protected boolean preTemplateProcess(HttpServletRequest request, HttpServletResponse response, freemarker.template.Template template, freemarker.template.TemplateModel data) throws ServletException, IOException
request
- the actual HTTP requestresponse
- the actual HTTP responsetemplate
- the template that will get executeddata
- the data that will be passed to the template
ServletException
IOException
protected String requestUrlToTemplatePath(HttpServletRequest request)
Configuration.getTemplate(String, Locale)
. You can override it
(i.e. to provide advanced rewriting capabilities), but you are strongly
encouraged to call the overridden method first, then only modify its
return value.
request
- the currently processed request
|
WebWork Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |