<%@page import="org.jini.rio.entry.ApplianceInfo" %>
<%@page import="java.net.*" %>
<%!

URI getURI(Entry[] entries) throws Exception {
    for(int i=entries.length-1; i>=0; i--) {
        if(!(entries[i] instanceof ApplianceInfo)) continue;
        ApplianceInfo entry = (ApplianceInfo )entries[i];
        return new URI("lpd://"+entry.hostName+"/public");
    }
    return null;
}

String getOrganization(Entry[] entries) throws Exception {
	for(int i=entries.length-1; i>=0; i--) {
		if(!(entries[i] instanceof Address)) continue;
                Address entry = (Address )entries[i];
                return entry.organization;
	}
    return null;
}

%>
