0

I've come across a strange problem, in my old code

${fn:substring(value, 13)}

can work OK. But after we upgrade to Websphere7, it complains

Unable to parse el function ${fn:substring(value, 13)}

If we supply the third parameter, it works

${fn:substring(value, 13, 0)}

I checked the standard.jar the version is correct and I do find the tld inside jar only serve the 3-parameters version of substring. This leads me to think that is that some older version EL will auto supply the third parameter if not found? Any where I can find this info?

jackysee
  • 2,051
  • 4
  • 32
  • 38
  • You've upgraded to WebSphere7 from which app server? – t0r0X Mar 07 '12 at 14:27
  • I'm supporting the answer from BalusC, the only possible reasons why this works must be either a bug on your old server or a very old JSTL library on your server, which might have resided in your old ...server/lib directory. – t0r0X Mar 12 '12 at 14:26

1 Answers1

1

That was apparently a bug in your old server.

The official docs says that it must take 3 arguments.

Function substring

java.lang.String substring(java.lang.String, int, int)

Fix your code accordingly to be not dependent on the bug of your old server anymore.

See also:

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555