This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes problem in tld while defining function which has to be used by EL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "problem in tld while defining function which has to be used by EL" Watch "problem in tld while defining function which has to be used by EL" New topic
Author

problem in tld while defining function which has to be used by EL

Mayur Shinde
Greenhorn

Joined: Feb 15, 2012
Posts: 18
I am declaring one function in tld which i have to use through el, now problem is the class in which i am defining is suppose GenerateRandom.java and it is in default package, so what i have to declare in <function-class> tag, because generally we here specify the package name like <function-class>com.info.GenerateRandom</function-class>, i have tried declaring only class name like
<function-class>GenerateRandom</function-class>
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1628
    
  23

Hi Mayur,

I am declaring one function in tld which i have to use through el, now problem is the class in which i am defining is suppose GenerateRandom.java and it is in default package,

This cannot be done, put you class in a package

Regards,
Frits
Mayur Shinde
Greenhorn

Joined: Feb 15, 2012
Posts: 18
Frits Walraven wrote:Hi Mayur,

I am declaring one function in tld which i have to use through el, now problem is the class in which i am defining is suppose GenerateRandom.java and it is in default package,

This cannot be done, put you class in a package

Regards,
Frits


It is possible that my class is in default package.
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1628
    
  23

It is possible that my class is in default package.

Off course it is possible, but if you read the java specs, then the default package is only meant for testing purposes. As soon as application servers are involved: don't use the default package: it won't work, and if it by accident works it won't be portable.

Regards,
Frits
Mayur Shinde
Greenhorn

Joined: Feb 15, 2012
Posts: 18
Frits Walraven wrote:
It is possible that my class is in default package.

Off course it is possible, but if you read the java specs, then the default package is only meant for testing purposes. As soon as application servers are involved: don't use the default package: it won't

Thanks for above information
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in tld while defining function which has to be used by EL
 
Similar Threads
EL function with parameter
can tld have more than 1 function signature?
EL functions in Eclipse, Can not find a tag library descriptor for ..., help needed
Doubts in Writing TLD
EL problem