You can use dynamic caching to improve the performance of a servlet and JavaServer Pages (JSP) files by serving requests from an in-memory cache. Cache entries contain the servlet's output and metadata.
Related reference
Web applications: Resources for learning