The bean is available in the tag thought the pageContex.
I think you can do something like this in your tag class.

name = ((Bean1)pageContex.getAttribute("bean1")).getCount();

you should check for null to avoid NullPointerExceptions.

Bean1 bean = (Bean1)pageContex.getAttribute("bean1");
if (null != bean) {
    name = bean.getCount();
}

/N

>From: sushma <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
>reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: assign a tag attribute value
>Date: Sat, 9 Jun 2001 11:36:22 -0700
>
>I have to assign a bean property to a tag attribute
>value. I tried the following.
>
><mytags:tag1 name= "<%= '<jsp:getProperty name="bean1"
>property="count">' %>" />
>## ERROR: Attribute bean1 has no value
>
>TIA,
>sushma
>
>
>__________________________________________________
>Do You Yahoo!?
>Get personalized email addresses from Yahoo! Mail - only $35
>a year!  http://personal.mail.yahoo.com/
>
>===========================================================================
>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

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

===========================================================================
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