Conclusions


This chapter covered the fundamentals of the HTTP protocol and presented the concept that Struts applications (like all JSP and Web applications) are governed by the underlying HTTP protocol and its request/response cycle.

HTTP requests are made up of a request for a resource (for example, GET /index.html ) and other control information in the form of HTTP request headers. After a server receives an HTTP request, the server processes it and sends a HTTP response. HTTP responses are made up of a response code (for example, HTTP/1.1 200 OK ), control information in the form of HTTP response headers, and the actual resource requested .

Not all HTTP requests result in a resource being returned; the HTTP response code will indicate what the outcome of the request was. Response codes may indicate that the requested resource moved, doesn't exist, or that some client- or server-based error occurred while trying to fulfill the request.

The servlet container provides request and response objects that are used in Struts (and in JSP in general). These objects are programming representations of the underlying HTTP request and HTTP response.

HTTP cookies are a special case of a HTTP request and HTTP response headers. Sessions are managed by setting session IDs as HTTP cookies. User sessions in Struts (and in JSP in general) are isolated between Web applications in the same servlet container.



Struts Kick Start
Struts Kick Start
ISBN: 0672324725
EAN: 2147483647
Year: 2002
Pages: 177

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net