File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL function TLD file: function-signature fully qualified name

 
Luis Centeno
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read in HFSJ that types (other than primitives) referred in <function-signature> element in TLD files for EL functions must be written in a fully-qualified way...However, I created below TLD file and surprisingly it works...



I thought it would have thrown a translation error but it worked fine and returned String value. Is String the default value when a type referred in <function-signature> cannot be found?
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The book illustrates what is written in the JSP specification :
spec wrote:Type is a basic type or a fully qualified Java class name (including package name), as per the ’Type’ production in the Java Language Specification, Second Edition, Chapter 18.


Containers are known to be forgiving. They may allow things which are not 100% spec friendly. For the exam, trust your book better than your container.
 
Luis Centeno
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

For the exam, trust your book better than your container.

Sure, I will...thanks a lot!
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please give the answer in straight, because, we couldn't understand these complex sentences in English! Thanks for caring.

And what does mean by Basic Types? java.lang package classes? Thanks.
 
Ankit Garg
Sheriff
Posts: 9497
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The return type (or parameter type) in the TLD should be fully qualified name of the class. So for SCWCD, you can say that the TLD is wrong as it uses String instead of java.lang.String. It might work on some containers, but the Specs say it should not work and the exam is based on the specs and not any containers...
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ankit Garg wrote:The return type (or parameter type) in the TLD should be fully qualified name of the class. So for SCWCD, you can say that the TLD is wrong as it uses String instead of java.lang.String. It might work on some containers, but the Specs say it should not work and the exam is based on the specs and not any containers...


Thank Ankit, now I got it. It's up to the Container developer. They can make these container to aware of these kind stuff or leave it (That means, the users of the container need to give full qualified names) Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic