org.glassfish.jersey.examples.console.resources
Class FormResource

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

@Path(value="/form")
public class FormResource
extends Object

A Web form resource, produces the form and processes the results of submitting it.


Constructor Summary
FormResource()
           
 
Method Summary
 Colours getColours()
           
 Response getForm()
          Produce a form from a static HTML file packaged with the compiled class
 String processForm(MultivaluedMap<String,String> formData)
          Process the form submission.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormResource

public FormResource()
Method Detail

getColours

@Path(value="colours")
public Colours getColours()

getForm

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

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.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.