O'Reilly logo

Play for Java by Nicolas Leroux and Sietse de Kaper

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required