Using Session Variables

There is another way for WebObjects pages to share values. That is, to use Session variables instead of Component variables.

This way we might not get the discrepancy we observed between clicking the browser back button and clicking the Back hyperlink in the last exercise.

Introduction to WebObjects Application Architecture

Run the Hello application again.

This time when the browser window appears, before you type anything and hit submit; open a new identical window to the Hello application.

Now, type your name and submit in the first window and a friend's name in the second. Notice how the two greeting pages will display the two different names. What you are witnessing is two open Sessions to the Hello application.

Get WebObjects® Developer's Guide 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.