I need to call one portal from another (IBM to JSR 168). Both Portals are in different WAR modules. I would like to save the Context-Root of the target to some common area which both portlets may reach e.g. DynaCache. However determining the context root of the target portal is my problem. I tried using a servlet which loaded on startup but the init() is called and with access to the ServletConfig object I don't see how I can get it as such info is not available. Ideally, I want to do something like request.getRequestURI() but first I'd have to force the doGet() to be called - not sure how this can be done. Alternatively, using MBeans, perhaps I could query the container for the context root. My understanding is wiring is not supported for this.
So - any ideas on how I can get the Context Root of another portal?