Docs Oracle
Docs Oracle
Docs Oracle
Preface
Initializing a Servlet
Function Servlet
Writing Service Methods Privacy Policy | Powered by
Getting Information from Requests Enter the bookstore BookStoreServlet
Constructing Responses
Create the bookstore banner BannerServlet
Filtering Requests and Responses
Programming Filters Browse the bookstore catalog CatalogServlet
Programming Customized Requests and Responses
Specifying Filter Mappings Put a book in a shopping cart CatalogServlet,
Invoking Other Web Resources BookDetailsServlet
Including Other Resources in the Response
Get detailed information on a specific book BookDetailsServlet
Transferring Control to Another Web Component
Part III Web Services 7. In the Projects tab, right-click the bookstore1 project, and select Undeploy and Deploy.
16. Building Web Services with JAX-WS
17. Binding between XML Schema and Java Classes 8. To run the application, open the bookstore URL http://localhost:8080/bookstore1/bookstore.
18. Streaming API for XML
To deploy and run the application using Ant, follow these steps:
19. SOAP with Attachments API for Java
Part VI Services 6. To run the application, open the bookstore URL http://localhost:8080/bookstore1/bookstore.
28. Introduction to Security in the Java EE Platform
29. Securing Java EE Applications
To learn how to configure the example, refer to the deployment descriptor (the web.xml file), which includes the following configurations:
30. Securing Web Applications
A display-name element that specifies the name that tools use to identify the application.
31. The Java Message Service API
32. Java EE Examples Using the JMS API A set of filter elements that identify servlet filters contained in the application.
33. Transactions
34. Resource Connections A set of filter-mapping elements that identify which servlets will have their requests or responses filtered by the filters identified by the filter elements. A
35. Connector Architecture filter-mapping element can define more than one servlet mapping and more than one URL pattern for a particular filter.
Part VII Case Studies
A set of servlet elements that identify all the servlet instances of the application.
36. The Coffee Break Application
37. The Duke's Bank Application A set of servlet-mapping elements that map the servlets to URL patterns. More than one URL pattern can be defined for a particular servlet.
Part VIII Appendixes
A. Java Encoding Schemes
A set of error-page mappings that map exception types to an HTML page, so that the HTML page opens when an exception of that type is thrown by the application.
B. About the Authors
Troubleshooting Duke's Bookstore Database Problems
Index The Duke’s Bookstore database access object returns the following exceptions:
BookNotFoundException: Returned if a book can’t be located in the bookstore database. This will occur if you haven’t loaded the bookstore database with data or
the server has not been started or has crashed. You can populate the database by running ant create-tables.
BooksNotFoundException: Returned if the bookstore data can’t be retrieved. This will occur if you haven’t loaded the bookstore database with data or if the
database server hasn’t been started or it has crashed.
UnavailableException: Returned if a servlet can’t retrieve the web context attribute representing the bookstore. This will occur if the database server hasn’t been
started.
Because you have specified an error page, you will see the message
If you don’t specify an error page, the web container generates a default page containing the message
and a stack trace that can help you diagnose the cause of the exception. If you use errorpage.html, you will have to look in the server log to determine the cause of
the exception.
Copyright © 2010, Oracle and/or its affiliates. All rights reserved. Legal Notices