Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

why ${fn:substring("123456",1,2)} work in jstl 1.0?  RSS feed

 
peter tong
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have checked my jstl.jar is version 1.0
Specification-Title: JavaServer Pages Standard Tag Library (JSTL)
Specification-Version: 1.0

but I write


and it can print '2' correctly, why? I see many website mentioned that fn is only available for jstl 1.1...
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66203
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

That is not the URI for JSTL 1.0, but for JSTL 1.1/1.2.
 
peter tong
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:
That is not the URI for JSTL 1.0, but for JSTL 1.1/1.2.


that means my project has jstl 1.1/1.2 jar??
but I check my project jstl.jar manifest and it show it is 1.0.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66203
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The URI is for JSTL 1.1 and later, so it must be there or an error would be shown.

Be aware that some JSTL implementation jars contain all the versions.
 
peter tong
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh, very sad, I face the exception in another project now.

Could not parse deployment descriptor: java.io.IOException: cannot resolve 'http://java.sun.com/jsp/jstl/functions' into a valid tag library
at weblogic.servlet.jsp.JspLexer.jspException(JspLexer.java:712)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!