Java Reference
In-Depth Information
Listing 4-3. The code for accountLookup.jsp
<%@ page import="java.util.List"%>
<%@ page import="com.appirio.entity.*"%>
<%
List<Account> accounts =
(List<Account>)request.getAttribute("accounts");
%>
<html>
<head>
<title>Google App Engine Servlet Example with Bigtable</title>
<link rel="stylesheet" type="text/css"
href="/stylesheets/styles.css"/>
</head>
<body>
<span class="title">Google App Engine Servlet Example with
Bigtable</span>
<p/>
<p>Before creating a new Opportunity, ensure that the Account does
not already exist. You can also <a
href="telesales?action=accountCreate"/>create a new account</a>.</p>
<p/>
<form method="post" action="telesales">
<input type="hidden" name="action" value="accountLookup"/>
<span class="heading">Search by Account Name:</span>
<p/>
<input type="text" name="accountName" value="<% if
(request.getParameter("accountName") != null) {
out.println(request.getParameter("accountName")); } %>" style="width:
300px"/>
&nbsp
<input type="submit" value="Search"/>
&nbsp
</form>
<p/>
<% if (accounts.size() > 0) { %>
<span class="heading"><%= accounts.size() %> accounts matching
your search criteria:</span>
<p/>
Search WWH ::




Custom Search