1

I have a bean with a method like below:

public String merge(Object... l) {
    return StringUtils.join(l);
}

now I want to call it in JSP EL like:

${bean.merge('1','2','3')}

but the page cause an IndexOutOfBoundsException.

Is it because JSP EL doesn't support variable-parameters feature, or just a bug in the JSP EL implementation in Apache Tomcat 7.0.19?

Piotr Nowicki
  • 17,914
  • 8
  • 63
  • 82
knly
  • 81
  • 1
  • 4

1 Answers1

1

You need to create EL function though which you can pass parameter. Have a look EL tutorial and SO thread.

Community
  • 1
  • 1
KV Prajapati
  • 93,659
  • 19
  • 148
  • 186