in html body
<form method="get" action="MovieTiming.jsp">
<table cellspacing="0" cellpadding="0" border="2" style="width:50%; height: 400px;" bgcolor="pink">
<tr style="height:4px;">
<td id="Date" colspan="5">
Please input date (yyyymmdd)<input name="Date" type="text" size="8" maxlength="8" value="<%=date%>"></input>
<button type="submit" value="Submit">Get Movies List</button>
</td>
<td>
<button onclick=fileWrite();>save file</button>
<input type="file" id="loc" name="loc" >[/B]</input>
</td>
</tr>
<tr bgcolor="white">
<td id="output" colspan="10" style="height:400Px;"> </td><td><textarea id="out" name="out" rows=20 cols=20 ></textarea></td>
</tr>
</table>
</form>
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