%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" import="org.apache.geronimo.samples.phone.client.*" %> <%! /* Name of the reference to the Search Phones service described in the web.xml file */ private final static String SERVICE_REF_NAME = "java:comp/env/service/SearchPhones"; /* Used for making hints to users */ private final static org.apache.geronimo.samples.phone.server.PersonPhone[] AVAILABLE_PHONES = org.apache.geronimo.samples.phone.server.SearchPhonesServer.AVAILABLE_PHONES; /* Returns the endpoint for calling methods of the web service */ public SearchPhonesPortType getService() throws Exception { javax.naming.InitialContext ctx = new javax.naming.InitialContext(); SearchPhonesService service = (SearchPhonesService)ctx.lookup(SERVICE_REF_NAME); return service.getSearchPhonesService(); } %> <% String name = request.getParameter("name"); %>
Phone Book Application | |||||
This is a Phone Book Web Application.
Please enter the name of the person whose phone number you wish to find.
|
|||||
Search criterion<% if (name != null && !name.equals("")) { PersonPhone[] foundPhones = getService().search(name); %>Search results
|