Moving On

In this chapter, you've learned how to create a bean that interacts with JSP pages. To do this successfully, a bean class needs to provide accessors for all the properties of the object.

It also needs to provide methods to read and write these objects from the database if the object persists over time. This requires having some key that can be used to access a record uniquely.

Filling out forms requires form validation. Using a HashMap to store the validation errors lets you get at specific field errors without needing a separate property for each one. Tomcat supplies a convenient way to send e-mail from Java. You learned in this chapter how it can be used to implement a lost-password function.

Finally, you used cookies to store the ...

Get MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.