java.lang.Object
org.glassfish.jersey.examples.console.resources.FormResource

@Path("/form") @Produces("text/html") public class FormResource extends Object
A Web form resource, produces the form and processes the results of submitting it.
  • Constructor Details

    • FormResource

      public FormResource()
  • Method Details

    • getColours

      @Path("colours") public Colours getColours()
    • getForm

      @GET public Response getForm()
      Produce a form from a static HTML file packaged with the compiled class
      Returns:
      a stream from which the HTML form can be read.
    • processForm

      @POST @Consumes("application/x-www-form-urlencoded") public String processForm(MultivaluedMap<String,String> formData)
      Process the form submission. Produces a table showing the form field values submitted.
      Parameters:
      formData - the data from the form submission
      Returns:
      a dynamically generated HTML table.