you should try this code instead
<%
pageContext.setAttribute("A","test");
%>

<%
out.println(pageContext.getAttribute("A"));
%>

this will print.. the value of "A" which is "test"

----- Original Message -----
From: "Dmitri Namiot" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 19, 2001 2:56 PM
Subject: general question


> a very simple test:
>
> <%
> String A="test";
> %>
>
> <%
> out.println(pageContext.getAttribute("A"));
> %>
>
> prints null. If 'A' is not a 'page scope' object, than
> what is it ? :)
> Is it a bug (Tomcat,Resin) or a feature?
> The real problem is how to create objects in JSP tags
> with no way to know about already existing stuff.
>
> ServletShop: java server side programming
> http://coldjava.hypermart.net
>
> ____________________________________________________________________
> Get your own FREE, personal Netscape WebMail account today at 
>http://home.netscape.com/webmail
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿü: ¢æ  ÿüg­Ê«~·ÿ&¡¢Ü¢fv·¬±«a¶Úÿÿù _òj 
(ýÊ&

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to