How to improve Servlet Performance ?

  1. Cache static data using jspInit() method.
  2. Release static data in jspDestroy() method.
  3. To concatenate string use, StringBuffer.
  4. Do not use println() method.
  5. Do not use PrintWriter to send binary data. Use ServletOutputStream.
  6. Always flush data in sections.
  7. Use getLastModified() method to handle browser and server cache.
  8. Use application server cache.
  9. Use session in following order: HttpSession, Hidden fields, Cookies, URL rewriting.
  10. Always remove HttpSession explicitly.
  11. Disable Servlet auto reloading.


Enter your email address to get our daily JOBS & INTERVIEW FAQ's Straight to your Inbox.

Make sure to activate your subscription by clicking on the activation link sent to your email