File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Execute JSP in a String Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Execute JSP in a String" Watch "Execute JSP in a String" New topic
Author

Execute JSP in a String

Chris Baron
Ranch Hand

Joined: Mar 21, 2003
Posts: 1049
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

Joined: Dec 11, 2004
Posts: 13410

There is nothing in JSP that allows you to evaluate strings as JSP code this way.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Chris Baron
Ranch Hand

Joined: Mar 21, 2003
Posts: 1049
Thanks Ben.
Ok, not in JSP. Just to be sure: does this apply to Java in general too?
cb
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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

Joined: Mar 22, 2000
Posts: 12781
    
    5
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

Joined: Mar 21, 2003
Posts: 1049
Thanks a lot for your answers and links.
cb
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Execute JSP in a String