Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using JSTL variables in JSP or Javascript. Possible ?

843835Sep 22 2002 — edited Oct 6 2008
Hi All,

Is it possible to share or use the variables which are declared are used by JSTL in JSP expression or scriplet code and in Java Script.

Example:

This Works:

<fmt:set var="test" value="JSTL" />
<fmt:out value="${test}" />

But, this gives error:

<% out.println(test) %>

And passing the value of variable 'test' to Java Script code also gives error.

How to use JSTL variables in JSP and in Javascript ?

Yours,
Sankar.B

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 3 2008
Added on Sep 22 2002
8 comments
4,127 views