Hi,
    I think that an unintentional clash of names is unlikely for the
simple reason
the to use a bean at all you are forced to use the full pakage name for
the bean ,
both in the <%@ page import="{package.class}" %> and the
<jsp:useBean...> tag.

Karl

Stephen Summerfield wrote:

> No one has mentioned the fact that when using the <jsp:useBean...> tags, the
> properties of beans that have names that match CGI/form parameters, get
> auto-magically set. Saves having to use request.getParameter() to get the
> parameters' values, although I can imagine some subtle application bugs when
> an unintentional clash of names occurs...
>
> Steve S
>
> > -----Original Message-----
> > From: A mailing list about Java Server Pages specification
> > and reference
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Matt Krevs
> > Sent: 06 December 1999 22:11
> > To: [EMAIL PROTECTED]
> > Subject: Re: What's the use of [<jsp:useBean> tag]?
> >
> >
> > Maybe one of the things we are all missing is that most of us
> > on this forum
> > (I assume) are programmers and are used to seeing java code
> > embedded in
> > things. Consider for a second that one major reason JSP was
> > developed was to
> > separate presentation from business logic. One advantage of
> > the usebean tag
> > provides a HTMLish tag that non-programmers can more easily
> > use in their
> > HTML.
> >
> > Granted it may be fairly simple for Java programmers to simply use
> > <%  MyBean mybean = new MyBean() ;
> >         mybean.setSomeVar( "somevalue" ) ;  %>
> >
> > instead of
> >
> > <jsp:useBean...>?
> >
> > but the useBean tag is much easier to use for non-programmers.
> >
> > I guess another possibly more important reason to use the
> > useBean tag is
> > that it hides the specific implementation of 'bean' scoping from the
> > programmer. What happens if suddenly, behind the scenes, the way that
> > application scope beans are stored/retrieved is changed in a
> > future JSP
> > release or implementation? If you have hardcoded java code in
> > your JSP pages
> > (eg getServletContext().setAttribute( key, value ) ) then
> > chances are you
> > have a very large search/replace task on your hands. If you
> > instead used the
> > 'usebean' tag then you dont have anything to worry about.
>
> ===========================================================================
> 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