I am having a simple string array in my bean as
public String[] colors = new String[]{"red", "blue", "green"};
and trying to display these colors from my xhtml as
<h:outputText value="#{myBean.colors[0]}"/>
but I am getting a java.lang.NumberFormatException: For input string: "colors"
java.lang.NumberFormatException: For input string: "colors"
at java.lang.NumberFormatException.forInputString(NumberFormatException.
java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.parseInt(Integer.java:497)
at javax.el.ListELResolver.coerce(ListELResolver.java:166)
at javax.el.ListELResolver.getValue(ListELResolver.java:51)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)