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 / April 2007

Tip: Looking for answers? Try searching our database.

Using DataSource object with JNDI

Thread view: 
ros - 02 Apr 2007 11:49 GMT
Hi,

I am working on this exercise and would be thankful if somebody could
point me in the right direction to tackle it.

Create a servlet that displays a list of customers (From the customer
table of the database). Use the HTML table to organize the display.

Hint: Use a Java Bean, e.g. CustomerBean that has the fields of 'First
Name', 'Last Name' and 'Date of Birth'. And when the query returns the
result set, you will need to populate each CustomerBean and add them
to an ArrayList. Then return the collection object to the servlet,
loop through the collection and display the result.

I have learnt to display data in an html table directly from a servlet
connected to a database via jdbc. But I do not understand how to use a
JavaBean to attain that as advised in the 'hint'.

I do not expect the solution but suggestions are welcome. If you know
of any online resource, or a book that deals with this topic, it would
be really helpful.

Thanks
Lew - 02 Apr 2007 14:01 GMT
> Hi,
>
[quoted text clipped - 17 lines]
> of any online resource, or a book that deals with this topic, it would
> be really helpful.

SIYF:
<http://java.sun.com/blueprints/corej2eepatterns/Patterns/DispatcherView.html>

-- Lew
ros - 02 Apr 2007 14:10 GMT
> > Hi,
>
[quoted text clipped - 22 lines]
>
> -- Lew

Thanks a lot Lew. That helps.
Ros


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



©2009 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.