Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2007

Tip: Looking for answers? Try searching our database.

Newbie question - MVC model and Accessing Database and resultset bean?

Thread view: 
Evrim - 08 Aug 2007 18:34 GMT
Hello

I have recently started reading about MVC model. From what  I have
understood, the servlets will take care of business logic and jsp is in
charge of presentation and beans hold the values. Whatever example I have
come across so far , deals with beans that handle types like string or int.

What I would like to do is to use my servlet to get the resultset from
database and store the resultset in a bean - then this bean will be accessed
by JSP (through get property) to be displayed.

Could you please inform me if there is a way to do this ? or this process is
not possible with respect to resultsets and session beans with set and get
property methods ?

Thank you very much in advance.....
Lew - 08 Aug 2007 22:58 GMT
> Hello
>
[quoted text clipped - 10 lines]
> not possible with respect to resultsets and session beans with set and get
> property methods ?

It's not only completely possible, it's downright common.

You will need a layer of "Data Access Objects" (DAOs), either explicitly coded
or declared via the Java Persistence API.  These will extract your data and
copy them into the beans that represent your object model.  You then use these
"entity" beans to feed your business process logic.

Signature

Lew



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.