Jakarta Servlet 5.0 Specification Document
Total Page:16
File Type:pdf, Size:1020Kb
Jakarta Servlet Specification Jakarta Servlet Team, https://projects.eclipse.org/projects/ee4j.servlet 5.0, September 07, 2020: Final Table of Contents Copyright. 3 Eclipse Foundation Specification License. 3 Disclaimers . 3 Jakarta Servlet Specification, Version 5.0 . 5 Preface . 5 Additional Sources . 5 Who Should Read This Specification . 5 API Reference . 6 Other Jakarta Platform Specifications. 6 Other Important References . 6 Providing Feedback . 7 1. Overview. 9 1.1. What is a Servlet? . 9 1.2. What is a Servlet Container? . 9 1.3. An Example . 9 1.4. Comparing Servlets with Other Technologies . 10 1.5. Relationship to Jakarta EE Platform. 10 2. The Servlet Interface . 11 2.1. Request Handling Methods. 11 2.1.1. HTTP Specific Request Handling Methods . 11 2.1.2. Additional Methods . 11 2.1.3. Conditional GET Support. 12 2.2. Number of Instances . 12 2.2.1. Note About The Single Thread Model. 12 2.3. Servlet Life Cycle. 13 2.3.1. Loading and Instantiation. 13 2.3.2. Initialization . 13 2.3.2.1. Error Conditions on Initialization . 13 2.3.2.2. Tool Considerations. 13 2.3.3. Request Handling . 14 2.3.3.1. Multithreading Issues. 14 2.3.3.2. Exceptions During Request Handling. 14 2.3.3.3. Asynchronous processing . 15 2.3.3.4. Thread Safety . 24 2.3.3.5. Upgrade Processing. 25 2.3.4. End of Service . 25 3. The Request . 27 3.1. HTTP Protocol Parameters . 27 3.1.1. When Parameters Are Available . 27 3.2. File Upload . 28 3.3. Attributes . 28 3.4. Headers . 29 3.5. Request Path Elements . 29 3.6. Path Translation Methods. 31 3.7. Non-Blocking IO . 31 3.8. HTTP/2 Server Push . 32 3.9. Cookies. 33 3.10. SSL Attributes . 33 3.11. Internationalization. 34 3.12. Request Data Encoding . 34 3.13. Lifetime of the Request Object . ..