Hi,
There are a couple of ways:
1) you can declare the variable using declaraton (instance scope)
<%! String headingText = "Login"; %>
2) you can create the variable in the "request" object and
then access it from the included jsp.
request.setAttribute("headingText", headingText");
And in the included jsp:
String headingText = (String) request.getAttribute("headingText");
Thanks,
Mandar.
"Blazevich, Steve" wrote:
> Hello all,
>
> Is it possible (if so...how) to set a variable in a JSP page (i.e.. String
> headingText = "Login") and then access that variable in an include file (<%=
> headingText %>)?
>
> Thanks for the help,
> Blaze.
>
> Steve Blazevich
> Phone: 303-967-0402
> Fax: 303-770-5452
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html