title: How to exclude properties when requesting from struts-rest-plugin?
body: <p>I am working on struts-rest-plugin <code>index</code> method to return list of my <code>Fruit</code> objects in <code>xml</code> or <code>json</code> format. It works really well.</p>
  
  <p>Model class:</p>
  
  <pre><code>class Fruit {
  
      private String name;
      private double price;
  
      // constructor
  
      // getter/setter
  
      // equals and hash method
  
  }
  </code></pre>
  
  <p>And I want to exclude some of the properties from my model object in xml/json output, say, price. I know I can wrap it with a wrapper class but it seems a bunch of things to do.</p>
  
  <p>What I have tried:</p>
  
  <pre><code>@Results(@Result(name = "success", type = "redirectAction", params = {
          "actionName", "fruit"}))
  public class FruitController extends ActionSupport implements
          ModelDriven&lt;Object&gt; {
  
      private int id;
      private Fruit model = new Fruit();
      private List&lt;Fruit&gt; list;
      private FruitService fruitService = new FruitService();
  
      public void setId(int id) {
          this.id = id;
          if (id &gt; 0) {
              this.model = fruitService.get(this.id);
          }
      }
  
      public int getId() {
          return this.id;
      }
  
      public HttpHeaders index() {
          list = fruitService.getAll();
          return new DefaultHttpHeaders("index").disableCaching();
      }
  
      @Override
      public Object getModel() {
          return (list != null ? list : model);
      }
  
      ....
  
  }
  </code></pre>
  
  <p>struts.xml</p>
  
  <pre><code>...
  &lt;constant name="struts.convention.action.suffix" value="Controller"/&gt;
  &lt;constant name="struts.convention.action.mapAllMatches" value="true"/&gt;
  &lt;constant name="struts.convention.default.parent.package" value="rest-default"/&gt; 
  &lt;constant name="struts.convention.package.locators" value="controller" /&gt;
  ...
  &lt;interceptor-ref name="params"&gt;
                  &lt;param name="excludeParams"&gt;price&lt;/param&gt;
  &lt;/interceptor-ref&gt;
  ...
  </code></pre>
  
  <p>It's not working. Please help. Thanks.</p>