Struts 2 enum form value

If you want to use enums in jsps while employing the struts 2 framework, add the following in your xwork-conversion.properties file:

java.lang.Enum = com.opensymphony.xwork2.util.EnumTypeConverter

Tags: , , ,

4 comments

  1. This is’nt a good advice, since EnumTypeConverter is deprecated:

    @deprecated Since Struts 2.1.0 as enum support is now built into XWork

    So you should smply update to a current version of struts and use enums directly.

  2. @jwi thank you so much for the comment. Like you said, since enum support is built in post version 2.1 , only users with version number less than that would actually be searching for a solution. This post (and as the title rightly says) is for Struts 2.0 :)

  3. I’ve a programmer for five years,I have learned your english through your blogs ~

  4. Hey great site.. will keep looking into it everyday.. Im new to java and it would be reallygreat if you add some tips on working with eclipse IDE..

Leave a comment