servlets
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| servlets [2008/10/08 11:47] – roumani | servlets [2008/10/08 19:36] (current) – roumani | ||
|---|---|---|---|
| Line 9: | Line 9: | ||
| ===== Outline ===== | ===== Outline ===== | ||
| - | == The Architecture == | + | == Tomcat as a Framework == |
| + | * Infrastructural services (networking, | ||
| + | * Persistence and session management | ||
| + | * Events (context and session listeners) | ||
| + | * Filters | ||
| + | * Declarative security | ||
| + | |||
| + | == Architecture == | ||
| * Tomcat = Coyote + Catalina + Jasper. It is a reference implementation of Sun's Servlet/JSP standards. | * Tomcat = Coyote + Catalina + Jasper. It is a reference implementation of Sun's Servlet/JSP standards. | ||
| - | * Coyote is a connector, Catalina is a servlet container, and Jasper is a JSP compiler. | + | |
| - | * Client uses HTTP to reach a Web Server which has a module (Apache) or a plug-in (IIS) for JK filtering. | + | |
| - | * The web server uses NFS to serve static | + | * Client uses HTTP to reach Coyote over TCP/IP; Coyote consults its URL mappings to determine how to serve: traditionally (NFS for static, CGI, or PHP/SSI) or via delegating |
| - | * You supply your servlet subclass to Catalina | + | * Catalina |
| - | * Coyote today comes with an HTTP version that bypasses the JK protocol; i.e. it acts as a web server | + | * Jasper turns JSP documents into servlets. Think of it as a JSP compiler. |
| + | * Coyote can also operate as a connector to an existing | ||
| == The MVC Design Pattern == | == The MVC Design Pattern == | ||
| Line 30: | Line 38: | ||
| * There is no client-to-thread mapping: the same client may get served by the same or a different thread. | * There is no client-to-thread mapping: the same client may get served by the same or a different thread. | ||
| * When it is time to stop this servlet, the server invokes its '' | * When it is time to stop this servlet, the server invokes its '' | ||
| + | |||
| + | == The Directory Structure == | ||
| + | * The subdirectories bin and conf | ||
| + | * The lib subdirectory | ||
| + | * The subdirectories logs and work | ||
| + | * The projects root: webapps | ||
| + | * The role of WEB-INF vis-a-vis visibility | ||
| + | * The subdirectories of WEB-INF: classes and lib | ||
| + | * The web.xml file | ||
| + | * Deploying war files | ||
| + | * The manager application | ||
| == The API == | == The API == | ||
| Line 36: | Line 55: | ||
| * Note that parameters are available as Map< | * Note that parameters are available as Map< | ||
| * The response object allows you to set the HTTP response line and headers as well as the payload. | * The response object allows you to set the HTTP response line and headers as well as the payload. | ||
| - | |||
| - | == The Franework == | ||
| - | * Infrastructural services | ||
| - | * Data structures and session management | ||
| - | * Database connectivity | ||
| - | * Events and filtering | ||
| - | * Declarative security | ||
| ===== To Do ===== | ===== To Do ===== | ||
| - | |||
| * Read Sections 6.1 through 6.5 of our textbook. | * Read Sections 6.1 through 6.5 of our textbook. | ||
| * Take an overall look at the servlet API (accessible from our // | * Take an overall look at the servlet API (accessible from our // | ||
| - | * Review | + | * Complete and then review |
servlets.1223466438.txt.gz · Last modified: by roumani
