Hi
I have a resource
public class SomeResource extends ServerResource{
@Post(json)
public Representation create(JsonRepresentation entity){
JSONObject jsonObj = entity.getJsonObject();
Literal literal = new
Vlidator().validate(jsonObj.getString(textKey));
}
}
public
I'm assuming that by language code you mean the value of the
Accepted-Languages header from the request.
You can use Request.getCurrent() to get the, um, current request, from
which you can retrieve the language(s). This works as long as you're in the
same thread that is handling the request, or
2 matches
Mail list logo