Switching default guest user tab via cookie

I want the portal to open another tab, not the first one for guest users that have already visited the portal in the last 2 days. Is this possible?

A neat aspect of uPortal and opensource is that basically anything is possible. uPortal is a powerful, flexible framework for building institutional portals. While this specific use case is not supported out of the box in uPortal, it is easily implemented. Here are some ideas

Use one guest user and add cheap tricks

The selected tab is basically just an XSLT parameter to the structure transform. XSLT parameters are marshalled as URL parameters per the BaseActionURL format. So switching the selected tab for users who have recently visited the portal amounts to adding a URL parameter for users who have recently visited the portal. This could be accomplished by fronting the portal with a Java Servlet Filter that would examine the request for the cookie and for the URL parameter, would set the cookie as needed, and would redirect to the URL with the parameter as needed. Or this could be implemented via a modest hack to UserInstance.java. There are other ways to accomplish this. One advantage of the amazingly modular rendering pipeline in uPortal3 is that it provides cleaner places to plug in this sort of behavior.

Switch among guest users

Another approach would be to model the "I haven't been to the portal recently" and "I've been to the portal recently" experiences as two different guest users. Again, you'd need to gate among these users via examination of that cookie. Gating could be accomplished by a filter. Requests passing through the Login servlet could be shunted based on the cookie if the cookie were considered an authentication credential to authenticate the user as one or another of some very soft, non-preference-modifying users.

Related information