Chapter 23. Redirection

Redirection

Redirecting the user to a different page is a useful technique frequently used in web programming. For example, you might want to create a splash screen effect—displaying the company logo for a few seconds and then redirect the user to the main page. Or, you might want to send cookies to the browser by writing the cookies in the HTTP response, plus the bit that tells the browser to fetch another page—effectively creating the cookies in one go. The two examples mentioned redirect the user without user interaction. In other situations, you might want the redirection to happen after the user performs an action.

This chapter ...

Get Java for the Web with Servlets, JSP, and EJB: A Developer’s Guide to J2EE Solutions 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.