Chapter 6. Handling user input
This chapter covers
- Working with forms
- Data binding
- Using body parsers
- Validation
- Handling file uploads
In this chapter, we’ll explain in detail how users can interact with our application. This is where we’ll enable users to send data to our application. We’ll see how to handle different kinds of data and how to customize Play to use our own data types. We’ll also explain how to make sure the data sent is correct and, if it’s not, how to alert our users.
6.1. Forms
Working with forms in a web application involves two operations: displaying the form and processing the form submission. Forms allow users to send data to the server (our application). In Play, forms are represented by objects that you can ...
Get Play for Java now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.