Posted By:
Shaun_Lim
Posted On:
Sunday, March 7, 2004 11:36 PM
I am a java newbie but would like to properly seperate the business and presentation logic of my web application. I did it first by using servlets to do all processing and JSP only for presentation to the user. However, i passed data from servlets to JSP and vice-versa using session.get/set attributes. Upon further reading i discovered that i should use a JavaBean to do the transfering of data. Now I'm confused, should i do away with servlets altogether and just package the functions into JavaBeans or should it be JavaBeans <-> Servlets <-> JSP? Also, is it possible for a servlet and JSP to share the same instance of a JavaBean?
More>>
I am a java newbie but would like to properly seperate the business and presentation logic of my web application.
I did it first by using servlets to do all processing and JSP only for presentation to the user.
However, i passed data from servlets to JSP and vice-versa using session.get/set attributes.
Upon further reading i discovered that i should use a JavaBean to do the transfering of data.
Now I'm confused, should i do away with servlets altogether and just package the functions into JavaBeans or should it be JavaBeans
<-> Servlets
<-> JSP?
Also, is it possible for a servlet and JSP to share the same instance of a JavaBean?
Sorry for the long question. Please help. Thanks!
Shaun
<<Less