| javax.servlet.http.HttpServlet com.opensymphony.webwork.views.freemarker.FreemarkerServlet
FreemarkerServlet | public class FreemarkerServlet extends HttpServlet (Code) | | author: CameronBraid |
Method Summary | |
protected Configuration | createConfiguration() | protected TemplateModel | createModel(ObjectWrapper wrapper, ServletContext servletContext, HttpServletRequest request, HttpServletResponse response) | protected Locale | deduceLocale(String templatePath, HttpServletRequest request, HttpServletResponse response) Returns the locale used for the
Configuration.getTemplate(StringLocale) call.
The base implementation simply returns the locale setting of the
configuration. | final public void | doGet(HttpServletRequest request, HttpServletResponse response) | final public void | doPost(HttpServletRequest request, HttpServletResponse response) | protected ObjectWrapper | getObjectWrapper() This method is called from process() to obtain the
FreeMarker object wrapper object that this result will use
for adapting objects into
template models.. | public void | init() | protected void | postTemplateProcess(HttpServletRequest request, HttpServletResponse response, Template template, TemplateModel data) Called after the execution returns from template.process().
This is a generic hook you might use in subclasses to perform a specific
action after the template is processed. | protected boolean | preTemplateProcess(HttpServletRequest request, HttpServletResponse response, Template template, TemplateModel data) Called before the execution is passed to template.process().
This is a generic hook you might use in subclasses to perform a specific
action before the template is processed. | protected String | requestUrlToTemplatePath(HttpServletRequest request) Maps the request URL to a template path that is passed to
Configuration.getTemplate(StringLocale) . |
configuration | protected Configuration configuration(Code) | | |
FreemarkerServlet | public FreemarkerServlet()(Code) | | |
createConfiguration | protected Configuration createConfiguration() throws TemplateException(Code) | | |
deduceLocale | protected Locale deduceLocale(String templatePath, HttpServletRequest request, HttpServletResponse response)(Code) | | Returns the locale used for the
Configuration.getTemplate(StringLocale) 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.
|
getObjectWrapper | protected ObjectWrapper getObjectWrapper()(Code) | | This method is called from process() to obtain the
FreeMarker object wrapper object that this result will use
for adapting objects into
template models.. This is a hook that allows you
to custom-configure the wrapper object in a subclass.
The default implementation returns @see Configuration#getObjectWrapper()
|
postTemplateProcess | protected void postTemplateProcess(HttpServletRequest request, HttpServletResponse response, Template template, TemplateModel data) throws ServletException, IOException(Code) | | Called after the execution returns from template.process().
This is a generic hook you might use in subclasses to perform a specific
action after the template is processed. It will be invoked even if the
template processing throws an exception. By default does nothing.
Parameters: request - the actual HTTP request Parameters: response - the actual HTTP response Parameters: template - the template that was executed Parameters: data - the data that was passed to the template |
preTemplateProcess | protected boolean preTemplateProcess(HttpServletRequest request, HttpServletResponse response, Template template, TemplateModel data) throws ServletException, IOException(Code) | | Called before the execution is passed to template.process().
This is a generic hook you might use in subclasses to perform a specific
action before the template is processed. By default does nothing.
A typical action to perform here is to inject application-specific
objects into the model root
Parameters: request - the actual HTTP request Parameters: response - the actual HTTP response Parameters: template - the template that will get executed Parameters: data - the data that will be passed to the template true to process the template, false to suppress template processing. |
requestUrlToTemplatePath | protected String requestUrlToTemplatePath(HttpServletRequest request)(Code) | | Maps the request URL to a template path that is passed to
Configuration.getTemplate(StringLocale) . 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.
Parameters: request - the currently processed request a String representing the template path |
Methods inherited from javax.servlet.http.HttpServlet | protected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doHead(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doTrace(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected long getLastModified(HttpServletRequest req)(Code)(Java Doc) protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException(Code)(Java Doc)
|
|
|