Need general a2s advice...

Hi All. From the servlet, I need to display a table on the browser. Up until now my servlet would have used something like this :

However in my current code, I have an a2s talking through input/output streams rather than using serialization. I was wondering how I could achieve the flexibility of above piece of code to display the table on the browser ??? I wpould appreciate any hints, tips, books, papers, web-sites (might have misse some) etc ???