This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes how to implemnet eval function in jsp ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "how to implemnet eval function in jsp ? " Watch "how to implemnet eval function in jsp ? " New topic
Author

how to implemnet eval function in jsp ?

Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
im trying to implement somekind of option that will mimk the "eval" function in jsp
Something like eval from javascritp or perl
can it be done somehow it jsp?

my case is that I need for example to generate dynamic variables names and I can't find any other possibility
Then using something like eval that I know.

Thanks all
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
If you want to be able to evaluate arbitrary function code, that sounds like a "scripting" language to me. There is a lot of activity in the area of scripting languages for Java - Jython, Beanshell, JRuby, Groovy are some that come to mind. A more detailed explanation of what you want to do would help.

Naturally you should never put any code of any significant complexity directly in a JSP. Create a helper class that can be tested outside the servlet environment.

Bill
 
 
subject: how to implemnet eval function in jsp ?
 
Similar Threads
Cannot load driver class: com pointbase jdbc.jdbcUniversalDriver
reassigning a variable
How to populate dependant <html:select>
Read text values in javascript
Looping through Checkboxes