I've used Struts2 to map actions to the methods that return String. Can I use other types? What types are possible to use?
I found that code using a REST plugin
// Handles /orders/{id} GET requests
public HttpHeaders show() {
    model = orderManager.findOrder(id);
    return new DefaultHttpHeaders("show")
        .withETag(model.getUniqueStamp())
        .lastModified(model.getLastModified());
}
It shows that it maps to method show that returns HttpHeaders. And it's not a String. How it works?