From:  Phil Hedley@MITEL on 11/17/2000 11:16 AM GMT

The directive <jsp:usebean> is misleading as these are not true Java beans, they
can be regular Java class objects. The JavaBean structure only needs to be
applied when using the set/get property directive.
The following is valid where MyObject is NOT a Java Bean.

<jsp:useBean id="MyObject" class="com.MyClass" scope="session"/>
<input type="text" name="username" value="<%=MyObject.getUsername()%>">

cheers,
Phil Hedley





Philip Weaver <[EMAIL PROTECTED]> on 16/11/2000 19:26:58

Please respond to A mailing list about Java Server Pages specification and
      reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:    (bcc: Phil Hedley/Cal/Mitel)

Subject:  Why use Java Beans?



I'm finding it difficult to fully grasp the benefit of using Java beans with
a MVC JSP/servlet architecture. I am more keen to use JSP taglibs and <%=
expressions %> to represent data in my pages. <jsp:usebean> was a mechanism
that was present in the JSP spec before taglibs were introduced in JSP 1.1.

Java Beans may have more necessity within servlets that being called
directly from within a JSP page.

Does anyone have any arguments for the usage of JavaBeans (as opposed to
regular objects in a servlet) in a web-based project?

Thanks,
Philip Weaver

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
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

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
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