Hi,

I recently joined the list and have found a lot of good tips already.

I have a question about JavaBeans design and I dared to bring it up in the JSP
forum as I think it is related. (BTW, is there any exclusive JavaBean
discussion forum ?)

I have got an impression (from books etc) that an ideal JavaBean should have a
few properties (along with their get/set methods), and allow adding/removing
EventListoners for other beans interested in those properties. That's all. It
should not have any other methods as it will prevent others from using it just
by plugging it under BeanBox.

I am writing a JSP/JavaBean application, where a Bean is used to do handle
Database. Assume there are 5 input fields on the WEB page and so there are 5
corrosponding properties in the bean. From JSP, I can manage to set those
properties individually using either "jsp:setProperty" or "<% mybean.setXxxx
(yyy) %>". My question is, now how does the Bean know (or how do I notify it),
that it's time to write the data in to the Database. I can have a method
"storeInDatabase ()" defined in Bean and have it called, but I think that's not
a correct design.

Also I recently download JRun 2.3.3 (build 154) for Unix, which supports JSP
1.0!. Shouldn't I be able to use <jsp:useBean> tag ? I still have to use old
<BEAN> tag. ???

thanks in advance,

- Rajesh



__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

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