%@ page import="java.util.*" %> <%@ page import="org.apache.tuscany.sca.host.embedded.SCADomain"%> <%@ page import="commonj.sdo.*" %> <%@ page import="das.*" %>
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%> <% SCADomain domain = (SCADomain) application.getAttribute("org.apache.tuscany.sca.SCADomain"); if (domain == null) { System.out.println("domain == NULL"); } DASService dasService = domain.getService(DASService.class, "DASServiceComponent"); if (dasService == null) { System.out.println("DASService == NULL"); } List companyList = null; try{ dasService.configureService(getClass().getClassLoader().getResourceAsStream("CompanyConfig.xml")); DataObject root = dasService.executeCommand("all companies", null); companyList = root.getList("COMPANY"); }catch(Exception e){ //TODO: handle case where dasService can't be initiated properly } %>ID | Name |
---|---|
<%=company.getInt("ID")%> | <%=company.getString("NAME")%> |