gov.noaa.pmel.tmap
Class TemplateServlet

java.lang.Object
  |
  +--VelocityServlet
        |
        +--gov.noaa.pmel.tmap.TemplateServlet

public class TemplateServlet
extends VelocityServlet

Servlet for Live Access Server user interface.

The LAS UI is generated from Velocity templates.

A HTTP request to the user interface is processed in the following order:

Version:
$Version$
Author:
$Author: kobrien $
See Also:
FormFilter, SessionFilter, ExceptionFilter, TemplateBean, Serialized Form

Constructor Summary
TemplateServlet()
           
 
Method Summary
protected  void error(HttpServletRequest request, HttpServletResponse response, java.lang.Exception cause)
          Override base VelocityServlet method to allow ExceptionFilter to catch Velocity template exceptions
(package private)  TemplateBean getBean(java.lang.String uri)
           
(package private)  java.util.Vector getBeanClassNames(java.lang.String uri)
           
 Template handleRequest(HttpServletRequest req, HttpServletResponse resp, Context ctx)
          Override base VelocityServlet method to allow special handling of template merging
 void init()
           
protected  java.util.Properties loadConfiguration(ServletConfig config)
           
protected  void mergeTemplate(Template template, Context context, HttpServletResponse response)
           
 boolean useTemplate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateServlet

public TemplateServlet()
Method Detail

init

public void init()
          throws ServletException
ServletException

loadConfiguration

protected java.util.Properties loadConfiguration(ServletConfig config)
                                          throws java.io.IOException,
                                                 java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundException

getBeanClassNames

java.util.Vector getBeanClassNames(java.lang.String uri)
                             throws ServletException,
                                    java.sql.SQLException
ServletException
java.sql.SQLException

useTemplate

public boolean useTemplate()

getBean

TemplateBean getBean(java.lang.String uri)
               throws ServletException,
                      java.sql.SQLException
ServletException
java.sql.SQLException

error

protected void error(HttpServletRequest request,
                     HttpServletResponse response,
                     java.lang.Exception cause)
              throws ServletException,
                     java.io.IOException
Override base VelocityServlet method to allow ExceptionFilter to catch Velocity template exceptions

ServletException
java.io.IOException

handleRequest

public Template handleRequest(HttpServletRequest req,
                              HttpServletResponse resp,
                              Context ctx)
                       throws ServletException,
                              java.io.IOException
Override base VelocityServlet method to allow special handling of template merging

ServletException
java.io.IOException

mergeTemplate

protected void mergeTemplate(Template template,
                             Context context,
                             HttpServletResponse response)
                      throws ServletException,
                             java.sql.SQLException,
                             java.io.IOException
ServletException
java.sql.SQLException
java.io.IOException