net.sourceforge.ajaxtags.servlets
Class BaseAjaxServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by net.sourceforge.ajaxtags.servlets.BaseAjaxServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, BaseAjaxXmlAction
Direct Known Subclasses:
AutocompleteServlet, CalloutServlet, DropdownServlet, FormUpdateServlet, HtmlContentServlet, NameInput, TreeServlet

public abstract class BaseAjaxServlet
extends javax.servlet.GenericServlet
implements BaseAjaxXmlAction

An abstract class from which each servlet extends. This class wraps the XML creation (delegated to the child servlet class) and submission back through the HTTP response.

See Also:
Serialized Form

Constructor Summary
BaseAjaxServlet()
           
 
Method Summary
 String getServletInfo()
          Get information about servlet.
 String getXMLEncoding()
          Each child class should override this method to set the specific XML encoding.
 void service(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
          Invoke the BaseAjaxXmlAction.getXmlContent(HttpServletRequest, HttpServletResponse) method.
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.ajaxtags.servlets.BaseAjaxXmlAction
getXmlContent
 

Constructor Detail

BaseAjaxServlet

public BaseAjaxServlet()
Method Detail

getServletInfo

public String getServletInfo()
Get information about servlet.

Specified by:
getServletInfo in interface javax.servlet.Servlet
Overrides:
getServletInfo in class javax.servlet.GenericServlet
Returns:
information about servlet

service

public final void service(javax.servlet.ServletRequest request,
                          javax.servlet.ServletResponse response)
                   throws javax.servlet.ServletException,
                          IOException
Invoke the BaseAjaxXmlAction.getXmlContent(HttpServletRequest, HttpServletResponse) method.

Specified by:
service in interface javax.servlet.Servlet
Specified by:
service in class javax.servlet.GenericServlet
Parameters:
request - the ServletRequest
response - the ServletResponse
Throws:
javax.servlet.ServletException - any errors
IOException - any IO error

getXMLEncoding

public String getXMLEncoding()
Description copied from interface: BaseAjaxXmlAction
Each child class should override this method to set the specific XML encoding.

Specified by:
getXMLEncoding in interface BaseAjaxXmlAction
Returns:
the encoding default to UTF-8


Copyright © 2005-2010 The Ajaxtags Team. All Rights Reserved.