On Feb 15, 2008, at 2:21 PM, Marc Hadley wrote:
>
> @Path("foo")
> @ConsumeMime("application/x-www-form-urlencoded")
> public class Foo {
>
> @POST
> public void register(FormData data) {
> // do something with form data
> }
>
> public static class FormData {
> String name,
> int serial,
> String rank }
> }
>
Sigh, more haste, less speed. I meant:
@Path("foo")
@ConsumeMime("application/x-www-form-urlencoded")
public class Foo {
@POST
public void register(FormData data) {
// do something with form data
}
public static class FormData {
String name;
int serial;
String rank;
}
}
> The main difference is that the former requires lots of @FormParam
> annotations while the latter requires a new class that encapsulates
> the form data.
>
> Marc.
>
> ---
> Marc Hadley <marc.hadley at sun.com>
> CTO Office, Sun Microsystems.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>
---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.