hi
i am newbie of apache common vfs
i have developed one web application which works currently on lan
in my apps one module i have do such that
using html tag input type=file, i have input a path value of the file
resides on client computer
at the bean side i have wrote fuction flieheader and call through jsp
---------------------------------------------------------------------------------------------
public boolean fileheadr(String fname)
{
File file = new File(fname);
try {
fis = new FileInputStream(file);
// Here BufferedInputStream is added for fast reading.
bis=null;
dis=null;
headr=null;
isheadr=false;
bis = new BufferedInputStream(fis);
dis = new DataInputStream(bis);
if(dis.available() !=0)
{
// dis.available() returns 0 if the file does not have more
lines.
//while (dis.available() != 0) {
// this statement reads the line from the file and print it to
// the console.
headr=dis.readLine();
//}
if(headr.equalsIgnoreCase("Sim Msisdn Mrp"))
{
isheadr=true;
// headr="right";
}
// dispose all the resources after using them.
}
fis.close();
bis.close();
dis.close();
}
catch (FileNotFoundException e)
{
e.printStackTrace();
}
catch (IOException e)
{
e.printStackTrace();
}
return isheadr;
}
--------------------------------------------------------------------------------------------
but it gives error in server logs java.io.filenotfound exception ,beacuse
server try to find particular file in
its local drive while its on clients local drive
now how can i achieve solution of this problem using vfs
please help me
--
View this message in context:
http://www.nabble.com/use-of-apache-common-VFS-tp16626988p16626988.html
Sent from the Commons - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]