final LdapClient client = null;
    public void postInit(ServletConfig config) {	final LdapClient client = null;	SContainer contentPane = getFrame().getContentPane();	tabs = new STabbedPane();	contentPane.add(tabs);	SForm settingsForm = new SForm(new SGridLayout(2));	tabs.add(settingsForm, "connection settings");	SLabel descServer = new SLabel("sever:port");	final STextField server = new STextField("");	server.setColumns(30);	server.setText(((PropertyService)getSession()).getProperty("ldap.server.host"));	settingsForm.add(descServer);	settingsForm.add(server);	SLabel descBaseDN = new SLabel("base DN");	final STextField baseDN = new STextField("");	baseDN.setColumns(30);	baseDN.setText(((PropertyService)getSession()).getProperty("ldap.server.basedn"));	settingsForm.add(descBaseDN);	settingsForm.add(baseDN);	SLabel descBindDN = new SLabel("bind DN");	final STextField bindDN= new STextField("");	bindDN.setColumns(30);	settingsForm.add(descBindDN);	settingsForm.add(bindDN);	SLabel descBindDNPassword = new SLabel("password");	final SPasswordField bindDNPassword= new SPasswordField();	bindDNPassword.setColumns(30);	settingsForm.add(descBindDNPassword);	settingsForm.add(bindDNPassword);	final SButton connectButton = new SButton("connect");	final SButton disconnectButton = new SButton("disconnect");	disconnectButton.setVisible(false);	settingsForm.add(connectButton);	settingsForm.add(disconnectButton);	SPanel panel = new SPanel(new SGridLayout(2));	tabs.add(panel, "browser");	treePanel = new SPanel();	panel.add(treePanel);	ldapTree = createTree();	treePanel.add(ldapTree);	attrPanel = new SPanel();	panel.add(attrPanel);	connectButton.addActionListener(new ActionListener() {		public void actionPerformed(ActionEvent e) {		    client = new LdapClient(server.getText(),					    baseDN.getText(),					    bindDN.getText(),					    bindDNPassword.getText());		    boolean success = client.getSuccess();		    if (success) {			connectButton.setVisible(false);			disconnectButton.setVisible(true);			tabs.setSelectedIndex(1);		    }		    else {			connectButton.setVisible(true);			disconnectButton.setVisible(false);		    }		    if (success) {			setLdapClient(client);			ldapTree = createTree(client);			treePanel.removeAll();			treePanel.add(ldapTree);		    }		}	    });	disconnectButton.addActionListener(new ActionListener() {		public void actionPerformed(ActionEvent e) {		    LdapClient c;		    c = getLdapClient();		    if (c != null) {			c.close();			System.out.println("client is non null");		    }		    treePanel.removeAll();		    attrPanel.removeAll();		    bindDNPassword.setText("");		    disconnectButton.setVisible(false);		    connectButton.setVisible(true);		}	    });    }