Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt on jstl, invoke instance method

 
aleyx chow
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys, i v a question on jstl.
surely i can mapping a public static method to an el function.
but i wanna know is it possible to mapping an instance method to an el function and how can i fulfil it?
can sb give some reference for that? thanx a lot.
 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
while invoking a function using EL,the function must be static and public.
Non static methods(instance methods) cannot be able to invoke using EL.
Perhaps using your own custom tags will meet your requirment.

correct me if iam wrong...
 
aleyx chow
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Vinod , thanx for u reply.

it seems that i can't mapping instance method to el directly.

Maybe i could define a static method just like this:

static Object invokeMethod(String methodName,Object obj)

and this method could invoke the instance method of the param obj.then mapping it to el. and now i could make the isntance acting.

is it right? correct me if i m wrong...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic