• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with EL Functions

 
Bharadwaj Adepu
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i want to call a method in the bean using the JSTL.
This is how am calling




This is the entry in the TLD file



When am trying to run this JSP am getting this error:


What is the reason for this Exception?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is something in your function causing a null reference?
 
Bupjae Lee
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without your testMethod() method, I can't point out what's wrong. Maybe isn't testMethod() static?
 
Bharadwaj Adepu
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Lee the function was not static.
Now i got another problem. When i try to run this JSP with other war then it prints
. The function call does not happen. Its not detecting the function call at all.
 
Bupjae Lee
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Lee the function was not static.


EL function should be static.
[ September 04, 2008: Message edited by: Bupjae Lee ]
 
Bharadwaj Adepu
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes Lee, the function was not static and i have changed it to static and that was solved and works fine, but my new problem is when i try the same JSP in other WAR, it just prints this code as it is, function call does not happen.
.
If the function was not static it gives a NullPointerException as earlier but does not print the above code!
Why is this happening,
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the web app properly declared in the deployment descriptor? Is the tag library properly declared on the pages? And if you have already checked these things, you should state so.
 
Bharadwaj Adepu
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes Bear!! deployment descriptor(web.xml) is properly declared, and even the tag libraries are also properly declared on the pages.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!