Hi, I have requirement to get the context root in javascript on page load.Not on any event.If you need on java you can try my previous solution like get the current viewId or url in ADF using ControllerContext. Following solution will work in any application Try this window.location.protocol = “http:” // gives you protocol window.location.host […]

ControllerContext – Context class for per request per web application Controller information. It have various method when you need to perform action programmatically .It Provide per-request information about the controller state for a web application. Use getInstance() method to get the context which includes: 1. ViewPortContext (current view rendered in a browser window, a modal […]