Putting CSV's from .txt file into a table on a JSP page
843836Feb 5 2005 — edited Feb 7 2005I have a simple form. When the user clicks submit they are taken to JSP page. This page saves the form values to a .txt file. It does this with a javabean that uses printwriter and filewriter. And I write all the values with commas between them to make csv's.
I want the JSP page to show a table containing all the values in the .txt file, and also to sort them into numerical order. I have no idea how to do this or even if it is possible. So basically, I need to import csv's from a .txt file into a html table and also to sort them. Can somebody please put me on the right track? Maybe I am using the wrong approach?
Also, at the moment I am just writing these values to a .txt file on my local machine. So in the filewriter string I have c:\temp.txt for example. Im developing using TomCat, what string would I use to save the .txt file on the server, ie. localhost8080?? I tried http://localhost8080/tmp.txt but it didnt work.