aspose file tools*
The moose likes Servlets and the fly likes creating a text file based on the the form information Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "creating a text file based on the the form information" Watch "creating a text file based on the the form information" New topic
Author

creating a text file based on the the form information

Gaurav Kalra
Greenhorn

Joined: Mar 13, 2001
Posts: 27
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

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
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: creating a text file based on the the form information
 
Similar Threads
File Downloads
File permission
JTextArea
Disabling html:text in Struts dynamically
Populating text area