hi,
I think you can,
<jsp:useBean id="common_name" scope="your_scope"
type="fully.qualified.name1"/>
<%
if(common_name == null)
{
%>
<jsp:useBean id="common_name" scope="your_scope"
type="fully.qualified.name2"/>
<%
}
%>


Nauman
----- Original Message -----
From: "eric pan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 24, 2002 8:58 AM
Subject: Re: using 2 bean with same id in jsps


> I think the id is a reference to the bean, the jsp
> compile the code
> ... id="xx" class="XX" ... to
>
> XX xx = ...;
>
> So I don't think you can put the same id in the same
> name space.
>
>
>
> --- "Elangovan,Bhuvane"
> <[EMAIL PROTECTED]> wrote:
> >     Could any one tell is there any way to use 2
> > beans with the same id in
> > the jsp under usebean tag.
> >
> >             The thing is I want to use the second
> > bean if the first bean is
> > null.
> >             IMPORTANT THING  is I want to use SAME
> > ID under usebean tag for
> > both beans.
> >
> >
> >
> > Thanks in advance,
> > (Bhuvane)
> >
> >
>
===========================================================================
> > 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://archives.java.sun.com/jsp-interest.html
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.jsp
> >  http://www.jguru.com/faq/index.jsp
> >  http://www.jspinsider.com
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Games - play chess, backgammon, pool and more
> http://games.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://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.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://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to