Comprehensive guide with code snippet that discusses:
1) how an HTML table can be used to select rows from
2) how to render a dynamic table using database
3) How and why to alternate row colors on even-'n'-odd basis
5. Custom Styles: Add CSS to Table
Monday,
soham.sengupta.java@gmail.com October 13,
5
2014
6. Ge n e r a t e Ta b l e s i n S e r v l e t
Steps to follow:
1. Create the Database (Ignore, if it exists)
2. Create table and populate with data
3. Create DSN (for ODBC) (ignore, if exists)
4. Create a Dynamic Web Application in Eclipse
5. Create a Java Class that has two static methods to
A. Connect to the Database aforesaid:
A. Fetches records from the table in the database.
B. Close the connection
Monday,
soham.sengupta.java@gmail.com October 13,
6
2014
7. G e n e r a t e Ta b l e s i n S e r v l e t … c o n t i n u e d
Monday,
soham.sengupta.java@gmail.com October 13,
7
2014
8. C r e a t e & C o d e a S e r v l e t
Monday,
soham.sengupta.java@gmail.com October 13,
8
2014
9. Same within a JSP
Monday,
soham.sengupta.java@gmail.com October 13,
9
2014
10. Need for Alternate Row Color
Monday,
soham.sengupta.java@gmail.com October 13,
10
2014