In the interest of reducing the coupling between the sites, your site should preferably not keep any information about state on the third party site.
Using sessions is out of the question, as your typical session won't be around the next day
You will have to persist this information, either in a database or in a cookie.
One way of implementing this is to have the third party site maintain a per-user, persistent state indicating the last location visited. This is most easily done using a page include or even better a filter
servlet (or better still a Servlet 2.3 filter). Once you have that, create a special location which reads the state and redirects the user there (say,
http://www.3rdpartysite.com/LastLocation; if you use a database, this would be a servlet; if you use cookies, it could even be plain HTML with a bit of JavaScript). If there is no last known location, it would redirect to the main index page.
Then all you'd have to do in your site is link to
http://www.3rdpartysite.com/LastLocation.
This keeps the coupling very loose - the only coupling is the existence of this special location which is supposed to take the user to the last visited location.
- Peter
[This message has been edited by Peter den Haan (edited April 24, 2001).]