Yes ,

This is obvious.Because, the include directive includes the data of the
specified file, with-out parsing.Since,parsing is dont after inclusion, this
error is obvious.

But,certainly its a good idea to include the output of a jsp page in another
jsp.
Probably JSP1.2 should do it!!

-Ram

Mike Cannon-Brookes wrote:

> I thought this was the case too, but running the file combination below
> yields...
>
> *** Error: Duplicate declaration of local variable "MB"
>
> Ideas guys? I know you can't redefine a local variable twice, but how can I
> 'check' if it's defined first? ;)
>
> Cheers,
> Mike
>
>  __
> |  | The BookmarkBox
> |  | http://www.bookmarkbox.com
> |/\| Manage and share your bookmarks online!
>
> Have you seen our new forums? http://www.bookmarkbox.com/ubbcgi
> Share your bookmarking with others and get helpful tips!
>
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Ramgopal Mudigonda
> Sent: Monday, 27 September 1999 6:38
> To: [EMAIL PROTECTED]
> Subject: Re: Working out if a bean has been instantiated?
>
>     Hi Mike,
>
> My understanding is, if the bean instance does not exists, then it will be
> created.Otherwise the the existing instance is used.
>
> In your case also same is the answer.
>
> -Ram
>
> Mike Cannon-Brookes wrote:
>
> > G'day guys,
> >
> > How can I work out if a bean has been instantiated?
> >
> > ie -
> >
> > fileA.jsp :
> > <jsp:useBean id="MB" class="MyBean" scope="application"/>
> > <%@ include file="fileB.jsp"%>
> >
> > fileB.jsp :
> > <jsp:useBean id="MB" class="MyBean" scope="application"/>
> >
> > Sometimes fileB.jsp is included in a file where the bean has already been
> > used, hence the variable exists. Othertimes, fileB will be the first to
> use
> > the bean, and will hence create the pointer to it.
> >
> > Any ideas?
> >
> > Cheers,
> > Mike
> >  __
> > |  | The BookmarkBox
> > |  | http://www.bookmarkbox.com
> > |/\| Manage and share your bookmarks online!
> >
> > Have you seen our new forums? http://www.bookmarkbox.com/ubbcgi
> > Share your bookmarking with others and get helpful tips!
> >
> >
> ===========================================================================
> > 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

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

Reply via email to