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:55] – 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. | ||
- | * All three are 100% Java | + | * All three are 100% Java and live off the same VM. They are one process in the eyes of the O/S. |
- | * Coyote is a web server / connector, Catalina is a servlet container, and Jasper is a JSP compiler. | + | * Coyote is a web server / connector, Catalina is a servlet container |
- | * Client uses HTTP to reach Coyote. | + | * Client uses HTTP to reach Coyote |
- | * Coyote | + | * Catalina |
- | * You supply your servlet subclass to Catalina | + | * Jasper turns JSP documents into servlets. Think of it as a JSP compiler. |
- | * Jasper turns JSP documents into servlets. Think of it an a JSP compiler. | + | |
* Coyote can also operate as a connector to an existing web server, such as Apache or IIS. In that case, the web server would handle traditional serving and, for servlet requests, would use the JK protocol (similar to HTTP but binary) to delegate to Catalina in process. | * Coyote can also operate as a connector to an existing web server, such as Apache or IIS. In that case, the web server would handle traditional serving and, for servlet requests, would use the JK protocol (similar to HTTP but binary) to delegate to Catalina in process. | ||
Line 32: | 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 38: | 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.1223466952.txt.gz · Last modified: 2008/10/08 11:55 by roumani