Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
HydraExpress Servlet Development Guide

8.1 Introduction

This chapter presents focused discussions of topics related to creating responses from a servlet. The organization of this chapter loosely follows the typical order in which a servlet creates a response. The chapter describes each topic in isolation. See Chapter 9, "Creating Servlets," for an example of a complete servlet.

Servlets that rely on maintaining state between requests most often let the servlet container manage state using sessions (Section 8.2). A servlet creates HTTP headers for the response (Section 8.3). The servlet may create the content of the response directly (Section 8.4). If the servlet generates HTML, the response may contain a URL back to the servlet (Section 8.4). If the servlet cannot fulfill the request, the servlet returns an HTTP error (Section 8.6), redirects the client (Section 8.7), or obtains the response from another servlet in the servlet container or another location on the Web (Section 8.8).

This section follows the conventions that request is a rwsf::HttpServletRequest object, that response is a rwsf::HttpServletResponse object and that any standalone lines of code occur within a servlet function such as doPost().



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.