Java Mailing List Archive

http://www.junlu.com/

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

Re: Function call using variables

Golda, Maria Mike(Cognizant)

2005-04-11


Hi,


U can call the function as <% temp() %>

Maria

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:JSP-INTEREST@(protected)
Sent: Saturday, April 09, 2005 2:59 AM
To: JSP-INTEREST@(protected)
Subject: Re: Function call using variables

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)
JSP-INTEREST".
For digest: mailto listserv@(protected)
DIGEST".

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

This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly

prohibited and may be unlawful.

===========================================================================
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.