Java Reference
In-Depth Information
Note The servlet in Listing 4-8 describes code for interacting with Bigtable. We'll provide more
details on the PersistenceManager, JDO, and JDOQL in Chapter 7.
Deployment Descriptor
When the web server receives a request for your application, it uses the deployment
descriptor to map the URL of the request to the code handling the request. Modify the
web.xml file with the code in Listing 4-9 to use the TelesalesServlet class. The servlet
mapping specifies that all incoming requests to “telesales” be mapped to the newly
created servlet defined in the servlet definition.
Listing 4-9. The web.xml file
<?xml version="1.0" encoding="utf-8"?>
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
<web-app xmlns="" version="2.5">
The servlet utilizes Bigtable to store data for your application. Listing 4-10
displays how you obtain an instance of the PersistenceManager from the
PersistenceManagerFactory object. As with most datastores, obtaining a
connection is expensive so you should the wrap it in a singleton.
Search WWH ::

Custom Search