Chapter 1. Introduction
Chapter 2. A taste of Scalatra
Figure 2.2. Scalatra and a few related technologies
Figure 2.3. A new Scalatra project
Figure 2.4. Following a route in the browser
Figure 2.5. Generating a 404 message
Figure 2.6. The default Scalatra 404 page
Figure 2.7. Views in your project structure
Figure 2.8. Create a show.ssp template.
Figure 2.9. Template output using SSP
Figure 2.11. You’ve got tests!
Figure 2.13. A compile error in the test terminal
Chapter 3. Routing
Chapter 4. Working with user input
Figure 4.1. A YouTube search with highlighted query string parameters
Figure 4.2. GitHub uses path parameters heavily in its repository browser.
Chapter 5. Handling JSON
Chapter 6. Handling files
Chapter 7. Server-side templating
Figure 7.1. In a traditional website, the client is served directly by Scalatra.
Figure 7.2. A RESTful API: a single Scalatra service serving disparate clients
Chapter 10. Working with a database
Figure 10.1. Components involved in the database interaction
Chapter 11. Authentication
Figure 11.1. The hacker-creation form
Figure 11.2. Dropping the database
Figure 11.3. HTTP Basic authentication in action
Figure 11.4. An unsuccessful login attempt
Figure 11.6. You can visit the hacker-creation form again.
Chapter 12. Asynchronous programming
Figure 12.1. A response from the Grabber
Chapter 13. Creating a RESTful JSON API with Swagger
Figure 13.1. Hacker API output
Figure 13.3. A new Hacker added to the tracker
Figure 13.4. Creating a package for your stacks
Figure 13.5. The stacks package after refactoring
Figure 13.6. The Swagger Petstore as viewed in Swagger-ui
Figure 13.7. Exploring the pet resource
Figure 13.8. Exploring the GET /pet/{petId} method
Figure 13.9. A raw machine-readable JSON spec
Figure 13.10. The resources.json API descriptor file
Figure 13.11. Swagger spec file for the ApiController
Figure 13.12. Browsing local API docs using Swagger UI
Figure 13.13. Getting a list of hackers
Figure 13.14. Hackers-api.json with a second annotated method
Figure 13.15. Swagger UI for POST/
Appendix Installation and development setup
Figure A.1. Making sure conscript works on Windows
Figure A.2. Making sure conscript works on Mac or Linux
Figure A.3. Making sure giter8 works
Figure A.4. Generating a Scalatra project
Figure A.5. Running Scalatra using sbt
Figure A.6. Starting the Scalatra app in a web server
3.133.133.61