• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to implemnet eval function in jsp ?

 
Ranch Hand
Posts: 620
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic