Using @FormParam to read data from forms
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Sat, 29 Aug 2009 16:15:20 +0200
changeset 472b6c104e6a59
parent 46 71e4cf307c93
child 48 69e897fe8140
Using @FormParam to read data from forms
freemarkerdor/src/main/java/cz/xelfi/quoridor/freemarkerdor/UI.java
     1.1 --- a/freemarkerdor/src/main/java/cz/xelfi/quoridor/freemarkerdor/UI.java	Sat Aug 29 15:55:53 2009 +0200
     1.2 +++ b/freemarkerdor/src/main/java/cz/xelfi/quoridor/freemarkerdor/UI.java	Sat Aug 29 16:15:20 2009 +0200
     1.3 @@ -45,6 +45,7 @@
     1.4  import java.util.Map;
     1.5  import java.util.Properties;
     1.6  import javax.ws.rs.DefaultValue;
     1.7 +import javax.ws.rs.FormParam;
     1.8  import javax.ws.rs.GET;
     1.9  import javax.ws.rs.POST;
    1.10  import javax.ws.rs.Path;
    1.11 @@ -87,7 +88,7 @@
    1.12      @Path("login")
    1.13      @Produces(MediaType.TEXT_HTML)
    1.14      public Response login(
    1.15 -        @QueryParam("name") String name, @QueryParam("password") String password
    1.16 +        @FormParam("name") String name, @FormParam("password") String password
    1.17      ) throws Exception {
    1.18          File f = new File(new File(new File(System.getProperty("user.home")), ".quoridor"), "passwd");
    1.19          Properties p = new Properties();