I recorded the voice on applet and store it in byte array.Now i want to write this in a file on server through applet.When i specify the address as,
String filename ="http://Gphapale:8080/ajit.txt";// location where the file is to be saved FileOutputStream fileOutS = new FileOutputStream(filename); I get following Error message: ERROR : Exception "http:\localhost:8080\sample.txt (The filename, directory name, or volume label syntax is incorrect)" Occured.
Is there any way to specify the filename so that it get store in tomcat root directory.
FileOutputStream is for use with a filesystem, not the HTTP protocol. You need some more work to move things across the network. The Apache Jakarta project has a class called HttpClient which does multipart form uploads and O'reilly has a multipart handler for the server side. That should get you pointed in the right direction.