My Webapplication ist built with Seam 2.2.2 and running as a deployed .WAR. Now I would like to seperate between tenants via URL filtering.
I thought that this could be done by configuration in components.xml or web.xml by adding some Filtering. a logical "subpath" could be used to separate between the differenct Tenants e.g. TENANT_1, TENANT_2,... TENANT_X.
Relevant URLs of the Application
WEBUI (Server Faces)
<filter-mapping>
<filter-name>Seam Filter</filter-name>
<url-pattern>/admin/*</url-pattern>
</filter-mapping>
http://192.168.0.12/MyApplication/TENANT_1/admin/configuration.seam
Rest-Service URL
<servlet-mapping>
<servlet-name>Seam Resource Servlet</servlet-name>
<url-pattern>/seam/resource/*</url-pattern>
</servlet-mapping>
http://192.168.0.12/MyApplication/TENANT_1/seam/resource/rest/seachService/findAllObjects
My question is how could i configure a filter that "ignores" the "TENANT_XXXXX" - part of the Url so that i could determine the wanted tenant id?
Is this a question that could be done by a Custom Servlet Filter, maybe there is a wildcard or regular expression needed for the Filter
Thank you very much in advance for any hint.
Best regards
malcom