954,604 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

file handling in html and jsp

in html body


Please input date (yyyymmdd)Get Movies List


save file
[/B]



 


function fileWrite
{
<%
String loc = request.getParameter("file");
String func = request.getParameter("out");
if(func!=null)
{

File strFile = new File(loc);
Writer objWriter = new BufferedWriter(new FileWriter(strFile));
objWriter.write(func);
objWriter.flush();
objWriter.close();
}
%>
}


but this code is throwing exception whenever i click on save as button says that no such file exist.
is there any other way of write data to the file using html javascript or jsp(embed in html)
prefer javascript

please help
please help

ravinderkadiyan
Newbie Poster
1 post since Jan 2008
Reputation Points: 10
Solved Threads: 0
 

check the location, may be there is some permission problem in server, there u have to put file read/write permission some time.

DangerDev
Posting Pro in Training
485 posts since Jan 2008
Reputation Points: 165
Solved Threads: 59
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You