• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
I have gone to look for myself. If I should return before I get back, keep me here with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic