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

Custom EL Function problems  RSS feed

 
Andy Selador
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having trouble getting a custom EL function working. Here is my pipemonitor.tld file.



Here is the .java file.



And finally, here is the .jsp file.



The .tld file is in the WEB-INF directory, and the .java file follows the correct package directory structure under WEB-INF/classes. The .jsp file is in the project directory.

The .jsp file only shows

CPU Usage: ${ns:cpu()}

(The EL function does not evaluate.)

Any suggestions?
 
Andy Selador
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it means anything, eclipse is saying I have an EL Syntax Error at

CPU Usage: ${ns:cpu()}
 
Andy Selador
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, so the real problem is that no EL is being evaluated. Any suggestions?

i.e. ${requestScope.hostname} just prints as is.
 
Andy Selador
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but <%=request.getAttribute("hostname")%> actually prints the hostname, so it is in the scope.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66205
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First step, get the EL evaluating in your project.

is the app set up correctly as a JSP 2.0 and Servlets 2.4 app as outlined in the JSP FAQ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!