Off late i have been asked this question a lot as to how to pass URL parameters in a Java ADF web application similar to ArcIMS HTML Viewer.
For example : You would like to open the web app and zoom to a given envelope
Other use cases might be :
- Turning on/off layers
- Adding resources dynamically
- Passing an authentication token
- Perform a query and show results on the graphic layer
Probably the easiest way of doing this is by tapping into the lifecycle of the web application using the Interface WebContextInitialize.
This can be done is three easy steps :
- Implement the Java class
- Register this class as managed bean in faces-config.xml
- Add this managed bean as an custom attribute to the WebContext in faces-config.xml