Migration Guide


SST HTTP Servlet API

SST support for the Sun Servlet web application model has been updated. SST now closely models the major features of Servlet API 2.2. As a result, there have been many SST API changes. Servlet protocol has changed, and a model of HttpServletRequest has been introduced. In general the result is a significantly extended API, but some legacy API has now been marked obsolete.

The classes SstHttpCgiRequestHeader and SstHttpCgiServlet are obsolete. Existing references to SstHttpCgiRequestHeader should be migrated to make use of SstHttpRequestHeader. Existing references to SstHttpCgiServlet should be migrated to SstHttpServlet. An implementation of these obsolete classes is provided, to facilitate migration only, in the application SstObsoleteCgiCompatibility.

The class SstHttpServer has a new role. It now represents "a server that understands the HTTP protocol"; it specifically knows nothing about servlets. The role of "servlet container" is now filled by SstHttpServletEngine.

Setting up a simple web application is quite different in 6.0, as it is based on the model of a web application provided by the Servlet 2.2 API. The primary conceptual difference is that one now must build a declarative web application specification object and deploy this in a web application server, whereas previously one specified the content of the web application by using API on the server directly.

The legacy example http server (SstHttpServerExample class>>#runAt:in:) should be reviewed as a guide for defining and deploying a web application. (This example has been extended to demonstrate some specific features of the new API, such as cookies, sessions, and error signaling).


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]