The WAF BaseServlet implements a Java Servlet and integrates it with the WAF kernel and persistence layers. The BaseServlet performs two functions:
Transaction management — The BaseServlet is responsible for starting and stopping the request's database transaction. If any errors occur, the servlet will roll back the transaction. If application code requests a redirect, the BaseServlet ensures that the transaction is finished before proceeding.
Request context — The BaseServlet packages certain facts about the request, such as the current user, current application, etc., and loads them into a context object whose data is available to any code running inside the servlet.
The BaseServlet is used in two principal ways in WAF:
New applications will sometimes use custom servlets that extend the BaseServlet and use the Servlet API to implement their UI.
Applications that use JSPs can take advantage of the WAF platform by having their JSP pages extend the BaseJSP class. Any code inside of the JSP will then be able to use the transaction and request context setup by the BaseServlet.