+ /**
+ * Retrieves the default template (<className>.templ) which has
+ * already been loaded.
+ *
+ * @return the default template.
+ */
+ public Template getDefaultTemplate() {
+ return defaultTemplate;
+ }
+
+ /**
+ * This method can be overridden to execute code and do stuff before the
+ * default template is applied.
+ *
+ * @param req
+ * the request to handle.
+ * @param resp
+ * the response to write to
+ * @return true, if the request is consumed and the default template should
+ * not be applied.
+ * @throws IOException
+ * if output goes wrong.
+ */
+ public boolean beforeTemplate(HttpServletRequest req, HttpServletResponse resp) throws IOException {
+ return false;
+ }
+
+ /**
+ * This method is called to generate the content inside the default
+ * template.
+ *
+ * @param req
+ * the request to handle.
+ * @param resp
+ * the response to write to
+ * @throws IOException
+ * if output goes wrong.
+ */
+ public abstract void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException;