Avoid HeadlessException when running JSF TGO component on headless environment
How to avoid HeadlessException when running JSF TGO component on headless environment?
Resolving the problem
When running your JSF JTGO application on headless environment, you must pay particular attention to not call any Swing component, which needs a display, otherwise you will get a java.awt.HeadlessException.
In particular, you should not use interactors such as IlvSelectInteractor, IlvPanInteractor or IlvZoomInteractor, but rather declare them in your JSP page using the jvf:XXXInteractor tags, where XXX is select, pan, or zoom.
Furthermore, the default toolbar that is being rendered by the ilog.cpl.network.renderer.IlpToolBarRenderer and ilog.cpl.equipment.renderer.IlpToolBarRenderer which contains Swing buttons should not be used. You can remove it by customizing your CSS file as follows:
toolbar : false; // or remove it completely.
zooming : true;
Finally, the IlpNetwork and IlpEquipment components set a default style sheet, defined under IlpNetwork.DefaultConfigurationFileName property and IlpEquipment.DefaultConfigurationFileName property respectively, when you try to instanciate an IlpNetwork or an IlpEquipment without specifying a style sheet. This will automatically create a toolbar for the component. To avoid the creation of the toolbar by default, you should use the following constructor to create the IlpNetwork and IlpEquipment objects:
IlpNetwork component = new IlpNetwork("network.css");
IlpEquipment component2 = new IlpEquipment("equipment.css");
More support for:
IBM ILOG JViews Telecom Graphic Objects
Software version: 8.6, 8.7, 8.8
Operating system(s): Platform Independent
Reference #: 1607061
Modified date: 14 August 2012