November 2017
Intermediate to advanced
420 pages
10h 29m
English
RESTEasy provides abstraction of multipart content handling with the multipart data provider plugin. This plugin enables you to easily parse the uploaded content submitted via HTML forms. To use the plugin, include the following Maven dependencies in the POM file:
<dependency> <groupId>org.jboss.resteasy</groupId> <artifactId>resteasy-multipart-provider</artifactId> <version>RELEASE</version> </dependency>
Let's try with the simple use case of an employee uploading/downloading his/her profile picture. For this use case, we will create a simple HTML form for the employee to upload his/her profile picture, as shown ahead:
<html><body><h1>Upload Employee Profile Picture</h1> <form action="webresources/employee/addimage" ...