# Multipart Web app Example

This example demonstrates how to develop RESTful web service with demonstrating JAX-RS Integration with MIME MultiPart Message Formats and an EE 6 compliant Web container.

## Running the Example

You can run the example using embedded GlassFish as follows:

Build and deploy the project by executing maven from the project directory

> `mvn clean package embedded-glassfish:run`

or you can run the example using Jetty as follows:

> `mvn clean package jetty:run`

Following steps are using cURL command line tool:

> Description | URL | sample request using curl
> --- | --- | ---
> POST message returning entire string | `http://localhost:8080/multipart-webapp/form/part` | `curl -X POST -F "part=part1" http://localhost:8080/multipart-webapp/form/part`
> POST message returning part filename string. | `http://localhost:8080/multipart-webapp/form/part-file-name` | Be sure to execute this curl from project directory where pom.xml resides `curl -X POST -F "part=@pom.xml" http://localhost:8080/multipart-webapp/form/part-file-name`
> POST message returning xml jaxb part string. | `http://localhost:8080/multipart-webapp/form/xml-jaxb-part` | No curl sample available, please check test sources.