Jakarta EE Cookbook
上QQ阅读APP看书,第一时间看更新

How it works...

The Jakarta EE server itself will call the doGet() or doPost() methods, depending on the HTTP method used by the caller. In our recipe, we are redirecting them both to the same doRequest() method.

The init() method belongs to the servlet life cycle that's managed by the server and is executed as a first method after the servlet's instantiation.

The destroy() method also belongs to the servlet life cycle and is executed as the last method before the instance's deallocation.