File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes el expression as parameter in el function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "el expression as parameter in el function" Watch "el expression as parameter in el function" New topic
Author

el expression as parameter in el function

Jonh Smith
Ranch Hand

Joined: Mar 18, 2010
Posts: 39
Hello.

I have a tag file defined like this:



localeString is an el function defined in the tld like this:



when it tries to compile the tag file, the container ( glassfish 2.1) complains line this:



Can anyone help me by telling me exactly what am i doing wrong ? is it illegal to use an el expression as a string parameter of an el function ?

Thanks
Jonh Smith
Ranch Hand

Joined: Mar 18, 2010
Posts: 39
figured it out: it should be
${mytags:localeString(language, "navbar.menubutton.label.users", "")}

not

${mytags:localeString(${language}, "navbar.menubutton.label.users", "")}
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60776
    
  65

This is a mistake a lot of people make -- thinking that ${} is some sort of operator. It's not. It encloses the entire EL expression and should never be nested within one.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jonh Smith
Ranch Hand

Joined: Mar 18, 2010
Posts: 39
Thanks Bear !
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60776
    
  65

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: el expression as parameter in el function
 
Similar Threads
Problem While using EL
EL Functions
EL function with parameter
body-content version conflict !!! (***doubt)
EL functions - returning a int.