updating server side file using java bean
I have written one web application. A jsp file getting the inputs from html form and send to java bean. In Java Bean, the input values are updated or inserted into the file which is residing in the same web server.
But it is failed to find the file name and gives the "FileNotFoundException" error.
Filename which has to be updated mentioned like below in the java bean code.
Please find the attachments for code.
Please Help me out.
: http:\localhost:8081\FileHandle\CMCINFOPAGE.html (The filename, directory name, or volume label syntax is incorrect)
Update Server side file using URL Connection
we can update the server side file using java URL Connection. See the attached code snippet for more info:
But this program is not updating the specified file(Testing.txt).
Also no errors coming.
Please have a look on this attached code and give your idea.