Hi friends,
I am trying to create a file in the client's machine (which runs in Windows) from an ear which is hosted in Websphere in a Unix machine.
My code snippet is as follows:
try
{
System.out.println("into largerLabel method");
MXSession mxsession = MXSession.getSession();
String s = sessionContext.getRequest().getRemoteAddr();
String s1 = "\\\\" + s + "\\EasyLabel\\" + "item.txt";
System.out.println("remoteFile:" + s1);
FileWriter filewriter = new FileWriter(s1);
System.out.println("Log File created");
filewriter.write("ITEMNUM\tDESCRIPTION\r");
filewriter.close();
System.out.println("Log File closed");
}
catch(Exception exception)
{
System.out.println(exception.getMessage());
}
This is a part of the class file which is packed in an EAR which runs in Websphere on a Unix Server. On execution of this code, I neither get an error nor any file is created in the client machine. My suspicion is as I am running this from a Websphere which is hosted in a Unix machine and I am creating a file in a Client's machine which is in Windows, the file does not created....Is that so?
Please throw some light into this!!
Thank You