• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Execute JSP in a String

 
Chris Baron
Ranch Hand
Posts: 1061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
how to execute JSP- respectively Taglib-Expression in String?



This String is supposed to be a property of a bean in the session. And i dont want it to translate before the locale/language is changed by the user.

Thanks in advance
cb
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is nothing in JSP that allows you to evaluate strings as JSP code this way.
 
Chris Baron
Ranch Hand
Posts: 1061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ben.
Ok, not in JSP. Just to be sure: does this apply to Java in general too?
cb
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know there are some 3rd party libraries out there the allow you embed scripting languages into Java apps but I've never seen anything that allows Java or JSP code to be evaluated at run time.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does this apply to Java in general too?

The standard Java language does not provide scripting support but there are languages such as Beanshell, Jython and Groovy that integrate well with Java.

It appears that Beanshell and or Groovy may become incorporated in future Java versions.

Java JSR for Groovy
Bill
 
Chris Baron
Ranch Hand
Posts: 1061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for your answers and links.
cb
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic