How can I invoke a method in JSP using EL ([*Expression Language*](https://en.wikipedia.org/wiki/Unified_Expression_Language))?

For example:

```
<c:forEach var="item" items="${listStr}" begin="0" end="2" step="2">
    <p>${item.indexOf("h")}</p>
</c:forEach>

```

Here, the `item` is an object of type `java.lang.String`. This causes errors when run on Tomcat.