This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes file-servlet-jsp-file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "file-servlet-jsp-file" Watch "file-servlet-jsp-file" New topic
Author

file-servlet-jsp-file

rupa kalid
Greenhorn

Joined: Jul 26, 2000
Posts: 4
My problem is getting around this issue
I have a text file ,in which i have a lot name, value pairs
eg name:value, i need a servlet to read this file, and pick out this name: value pairs, and write them into a jsp page, when the user makes changes to the jsp page, the servlet collects those changes and writes it back to the text file.
is this possible???
my id is rupakalidoss@hotmail.com
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Servlets can certainly read and write files on the system they are running on. The only thing tricky is getting the path and file name right.
If you want the user to edit and send back the data, your JSP page will have to write a form with a textarea. You set the initial textarea contents from the file and the revised contents will be sent back to the servlet doPost method. Any good HTML reference will give you the details.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: file-servlet-jsp-file
 
Similar Threads
POSTing to login to Server :from JSP or a specific Servlet file?
Writing to a text file using servlet
Reading an ArrayList from JSP to Servlet
storing data without using a database.
Loading a file in a servlet at run time