You can do something like the following :
<% pageContext.setAttribute("someVar","value"); %> <c:out value=${someVar}/> ----- Original Message ----- From: "Karl Coleman" <[EMAIL PROTECTED]> To: "Tag Libraries Users List" <[EMAIL PROTECTED]> Sent: Thursday, April 22, 2004 15:01 Subject: RE: scriptlet variables and JSTL AFAIK, you have to use <c:set>. I've yet to figure out how to do it otherwise. Karl -----Original Message----- From: Anuj Agrawal [mailto:[EMAIL PROTECTED] Sent: Thursday, April 22, 2004 12:04 AM To: [EMAIL PROTECTED] Subject: scriptlet variables and JSTL Because i'm unable to perform my required action via JSTL tags (or other taglibs), i'm forced to use scriptlets within my JSP. What i'd like to be able to do is use variables in the scriptlets, and then output (or access) them via some core tags. I read that for this i have to use <jsp:useBean .../> .. but i must be doing something wrong because it doesn't give me the required output. Essentially i want to: <jsp:useBean id="x" type="java.lang.String"/> <% x = "hello"; %> <c:out value="${x}"/> (I know i can use <c:set ../>, but the above is a simplistic example.) Thanks for any help. Anuj. __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]