Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Create a file in Windows machine from an ear running in Unix Server

Venkatlakshmi Baskaran
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:

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");
System.out.println("Log File closed");
catch(Exception exception)

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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic