I get the strangest thing going on…
I have a JSP file which read a file from given path, but somehow the http:// is changed to http:\
BufferedReader in = new BufferedReader(new FileReader("http://server/path/file.sql"));
the exception i get is:
(the file exist for sure!!! works when url is entered in webrowser).
exception=http:\server\path\file.sql (The filename, directory name, or volume label syntax is incorrect)
Use
new InputStreamReader(new URL("http://....").openStream(), "UTF-8")FileReaderis used to read the filesystem, not URLs. Also have in mind that writing java code in JSP is usually not a good idea. See here