Class FormResource
- java.lang.Object
-
- org.glassfish.jersey.examples.console.resources.FormResource
-
@Path("/form") @Produces("text/html") public class FormResource extends ObjectA Web form resource, produces the form and processes the results of submitting it.
-
-
Constructor Summary
Constructors Constructor Description FormResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColoursgetColours()jakarta.ws.rs.core.ResponsegetForm()Produce a form from a static HTML file packaged with the compiled classStringprocessForm(jakarta.ws.rs.core.MultivaluedMap<String,String> formData)Process the form submission.
-
-
-
Method Detail
-
getColours
@Path("colours") public Colours getColours()
-
getForm
@GET public jakarta.ws.rs.core.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(jakarta.ws.rs.core.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.
-
-