Instantiating the component

You can instantiate a Web DataWindow component in the following manner:

<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="org.omg.CORBA.ORB" %>
<%@ page import="org.omg.CosNaming.NamingContext" %>
<%@ page import=          "org.omg.CosNaming.NamingContextHelper" %>
<%@ page import="org.omg.CosNaming.NameComponent" %><%@ page import="DataWindow.*" %>

String dwGenerator = "DataWindow/HTMLGenerator125";
HTMLGenerator125 dwGen = null;

java.util.Properties props =new java.util.Properties();
props.put("org.omg.CORBA.ORBClass",
   "com.sybase.CORBA.ORB");
props.put("com.sybase.CORBA.NameServiceURL",    "iiop://testmachine:2000");
ORB orb = ORB.init((String[])null, props);
try {
	  NamingContext cntx = NamingContextHelper.narrow       (orb.resolve_initial_references("NameService"));
     	NameComponent[] name = {new        NameComponent(dwGenerator,"")};
     	SessionManager.Factory factory =        SessionManager.FactoryHelper.narrow
         (cntx.resolve(name));
	  dwGen =         HTMLGenerator125Helper.narrow(factory.create
          ("jagadmin",""));
} catch(org.omg.CORBA.ORBPackage.InvalidName ie) {
		out.print("Error: " + ie.getMessage()); 
} catch (org.omg.CosNaming.NamingContextPackage.NotFound ne) {
		out.print("Error: " + ne.getMessage()); 
} catch 
(org.omg.CosNaming.NamingContextPackage.CannotProceed     ce) {
		out.print("Error: " + ce.getMessage()); 
} catch 
(org.omg.CosNaming.NamingContextPackage.InvalidName     ie1) {
		out.print("Error: " + ie1.getMessage()); }