I am developing an application that will serve multiple customer-organizations, each of them should be given access based on a fixed url. Example: domain/myapp/CustomerOrg1
Previously I always registered a new WAComponent-subclass for each of these entry-points. That does work but there has to be a better solution, I would like a single component-class to find out which URL the request uses (to then respond with the customer-org's homepage)
I tried:
registering a WARequestHandler-subclass; and it allows me to find out the full path (incl. /CustomerOrg1
) but I am outside of any session and don't know how to get into one.
registering a WAComponent-subclass as /myapp
, and it works in that it also handles /myapp/CustomerOrg1
automatically, however when I try to find out the URL used (by self session url inspect
) it claims to be only the base-url (/myapp
).
Try
self requestContext request uri
and if you are not in a component but any object you can do
WACurrentRequestContext value request uri