okay so i have created restful webservice.now how to create a path for a user "abc".
Something like this
http://stackoverflow.com/user/abc
Following is my form for getting the user input thorugh html
@POST
@Produces(MediaType.TEXT_HTML)
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
public void newUser(
@FormParam("uname") String uname,
@FormParam("password") String password,
@Context HttpServletResponse servletResponse
) throws IOException {
User u = new User(uname,password);
User.userdata.put(uname,password);
}
How to make a URI something like this from the form parameters if user has uname as "abc"
http://mysite/user/abc