Now that you've mastered the basics, it's time to bring out thebig iron. This week, The JSP Files explores the various techniquesavailable to "maintain state" on a JSP-based Web site. Learn about theCookie and Session objects, find out how to build a cookie-based hitcounter, and read about a simple yet effective way of protecting sensitiveWeb pages with the Session object.
Over the past few weeks, you've learned a great deal about the variouscontrol structures and objects available in JSP. You've see how to retrieveinformation posted in an online form, and connect your JSP document to adatabase for dynamic content generation.
This week in The JSP Files, we're going to tackle yet another veryinteresting topic - the problem of maintaining "state" on a Web site. We'llbe looking at two common solutions to this problem - cookies andserver-based sessions - and using simple examples to illustrate the JSPconstructs available to help you identify and track client requests on yourWeb site.
You'll also learn more than you want to know about what exactly"maintaining state" actually means, the advantages and disadvantages ofeach of the approaches just described...and, if we're doing our job right,get a laugh or two out of the whole exercise.