creating a text file based on the the form information
Gaurav Kalra
Greenhorn
Joined: Mar 13, 2001
Posts: 27
posted
0
How do i create a text file based on the inputs obtained from a form. Also how do i create a resultset which is not forward only. The method setDirection is not working correctly.
Andrew Shafer
Ranch Hand
Joined: Jan 19, 2001
Posts: 338
posted
0
The parameters gathered from the form are String objects. IO works the same in JSP, to write to a file you need to instantiate a FileWriter object. This can either be handled in the JSP file or in a bean that the JSP will use. This is one suggestion that will work. (you must import "java.io.*")
After that you can call form.print() or any other PrintWriter methods and it will write to your file. I don't understand your question about result sets. Also, even though you are using this on a JSP, your questions are really about I/O and JDBC respectively. You might get better answers in those forums.
!_I_Know_Kung_Fu_!
Bosun Bello
Ranch Hand
Joined: Nov 06, 2000
Posts: 1506
posted
0
As for your resultset question, it depends on teh JDBC driver you are using. JDBC 2.0 drivers to support moving forward/backward withing the resultset. Bosun
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley