Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JSP Interest »

Re: Function call using variables

Prat

2005-04-08


No, thats not what I wanted to do. I have to call the function in the bean
but using a string variable that contains the function name.

For instance,

<%
String temp = "function" + "name" + "()"; // This is a simple example of
what I need to do.
%>
<TD><%=temp%></TD> -- This should ideally execute the function and get me
the results. I would like to know if there is something similar to "exec"
or "eval" to do this.

Thanks for your time,
PD

===========================================================================
To unsubscribe: mailto listserv@(protected)".
For digest: mailto listserv@(protected)".

Some relevant archives, FAQs and Forums on JSPs can be found at:

http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
http://forums.java.sun.com
http://www.jspinsider.com
©2008 junlu.com - Jax Systems, LLC, U.S.A.