Я пытаюсь выяснить, как получить параметры от объекта запроса Restlet.
мой запрос входит как / клиент? userId=1 и я хотим захватить параметр для передачи моему ДАО для запроса.
public class CustomerResource extends ServerResource
{
@Get("xml")
public Representation toXml() throws ResourceException, Exception
{
try
{
//get param from request
//call DAO with parameter
}
catch(Exception e)
{
throw e;
}
}
}
Я разобрался с этим....
public class CustomerResource extends ServerResource
{
@Get("xml")
public Representation toXml() throws ResourceException, Exception
{
try
{
//get param from request
getQuery().getValues("userId")
//call DAO with parameter
}
catch(Exception e)
{
throw e;
}
}
}