title: How do I use an enum parameter in struts 2?
body: <p>I'm trying to get an Action in Struts 2 to work with an Enum as an input parameter. What I've done so far looks like:</p>
  
  <pre><code>public TestAction {
    public enum Module {
      VALUE1;
    }
  
    private Module module;
  
    public void setModule(Module module) {
      this.module = module;
    }
    public Module getModule() {
      return module;
    }
  }
  </code></pre>
  
  <p>But when trying to use this I get an xwork conversion error, and the action itself doesn't even execute. Can I make this work as is, or should I provide setModule(String) myself?</p>
  
  <p>Edit: I'm using struts 2.1.6
  The URL I'm trying: /test.action?module=value1</p>