the follwong exception is thrown while calling 1st page of my application
org.apache.jasper.JasperException: /WEB-INF/login.jsp(28,21) The function split mus
The syntax as you have there (invoking non-getter methods with arguments) is only supported in EL 2.2. You seem not to be targeting a container which supports Servlet 3.0 / JSP 2.2 / EL 2.2 (Tomcat 7, Glassfish 3, etc) or your web.xml
seems not to be declared conform Servlet 3.0 spec. Before EL 2.2, the foo()
syntax is only recognized as an EL function and it is supposed to be of this form ${prefix:functionName(arg1, arg2)}
. That's also what the exception is trying to tell you.
If you're indeed not targeting a Servlet 3.0 container and/or it is not possible to change the web.xml
conform Servlet 3.0, then you need JSTL's fn:split()
instead (yes, that's a real EL function):
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
...
<c:set var="parts" value="${fn:split(i, '#')}" />
<option value='${parts[0]}'>${parts[1]}</option>