Writing a simple HTML report using Java
-
Hi, I have to write a report in HTML document using java. Can somebody suggest me some good tutorial or some good links that will help me in doing this task. It would be very helpful.Please do help me out. Thank You.
Salam ( == Hi ); As I understood; you want to use Java to generate a report in HTML format. There is a simple to do job. You just need to do the following: 1- Create an HTML file and Open it in Java; 2- Add header data to the file; 3- Connect to your data source; for example MySQL using JDBC; 4- Run a query to the data source; 5- Parse the query result; 6- Add a parsed query result in appropriate places at the HTML file; 7- Finally add footer to the file; 8- Close the stream; To show it in your program; use the Swing library; there is a tut. on sun.com; link
With my best and warmest regards; & With the hope of coming of Mahdi; Ali Shakiba; Kerman - Iran (Islamic Republic);