• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:

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
 
Just let me do the talking. Ahem ... so ... you see ... we have this tiny ad...
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic