Class BaseWebServiceServlet

  • All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
    Direct Known Subclasses:
    JsonRestServlet, WebServiceServlet

    public class BaseWebServiceServlet
    extends javax.servlet.http.HttpServlet
    This servlet has two main responsibilities: 1) authenticate, 2) set the correct OBContext , and 3) translate Exceptions into the correct Http response code.

    In regard to authentication: there is support for basic-authentication as well as url parameter based authentication.

    Author:
    mtaal
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void callServiceInSuper​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      protected void doService​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      protected WebService getWebService​(javax.servlet.http.HttpServletRequest request)  
      protected void service​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
      • Methods inherited from class javax.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
    • Constructor Detail

      • BaseWebServiceServlet

        public BaseWebServiceServlet()
    • Method Detail

      • service

        protected final void service​(javax.servlet.http.HttpServletRequest request,
                                     javax.servlet.http.HttpServletResponse response)
                              throws javax.servlet.ServletException,
                                     IOException
        Overrides:
        service in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        IOException
      • getWebService

        protected WebService getWebService​(javax.servlet.http.HttpServletRequest request)
      • callServiceInSuper

        protected void callServiceInSuper​(javax.servlet.http.HttpServletRequest request,
                                          javax.servlet.http.HttpServletResponse response)
                                   throws javax.servlet.ServletException,
                                          IOException
        Throws:
        javax.servlet.ServletException
        IOException
      • doService

        protected void doService​(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response)
                          throws javax.servlet.ServletException,
                                 IOException
        Throws:
        javax.servlet.ServletException
        IOException