InputStream in=null;
OutputStream out = null;
String webDirectory=/usr/local/jakarta/apache-tomcat-5.5.25/webapps/LaCoronaHotel-ForTesting2/images
String src = c:\samplepic.jp g
in = new FileInputStream (src);
fileName="/packages.gif";
out = new FileOutputStrea m(webDirectory+ fileName);
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
in.close();
out.close();
This is a part of my method
it is a web application where in i browse for the new picture and replace it with the existing one located on "webDirecto ry" ...
when i try it on my pc where the "webDirecto ry" is:
C:\Program Files\Apache Software Foundation\Tomc at 5.5\webapps\LaC oronaHotel
it works
but right after i upload it on my hosting where it is hosted in a linux computer it doesnt work.. i get no error logs, it just wont work any ideas?? anything i might have missed?
is it possible to change a file from a windows to linux?
OutputStream out = null;
String webDirectory=/usr/local/jakarta/apache-tomcat-5.5.25/webapps/LaCoronaHotel-ForTesting2/images
String src = c:\samplepic.jp g
in = new FileInputStream (src);
fileName="/packages.gif";
out = new FileOutputStrea m(webDirectory+ fileName);
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
in.close();
out.close();
This is a part of my method
it is a web application where in i browse for the new picture and replace it with the existing one located on "webDirecto ry" ...
when i try it on my pc where the "webDirecto ry" is:
C:\Program Files\Apache Software Foundation\Tomc at 5.5\webapps\LaC oronaHotel
it works
but right after i upload it on my hosting where it is hosted in a linux computer it doesnt work.. i get no error logs, it just wont work any ideas?? anything i might have missed?
is it possible to change a file from a windows to linux?
Comment