• 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

How to open File on server Using JCIFS or any other method

 
Ranch Hand
Posts: 32
Netbeans IDE Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am having a problem , My server is in Linux and I have to open the file (Excel File) on clicking a button , Since Linux Server has password , I am unable to open without authenticating on to server ,I am able to open file on Windows Server which is not having the password.
So I used JCIFS and now I can list down all the Files in the directory I can read them also ,but can't execute on my client machine. Tough I can use simple java to open any file on network on the machine which is not password protected or say has access . I can't allow server to have full access to client machine , I want client to use authentication and then execute file from server .

I am using this code to authenticate and read can you help me to execute it from Server after checking credential from Client.


 
Kr. Pallav
Ranch Hand
Posts: 32
Netbeans IDE Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got a way to do it ,sorry for delay I am putting down the code I used to do it , also I would apologize as I feel I created post under wrong heading , I was developing a desktop application not a servlet one .
Code I used is


here I am considering 192.168.1.7 as server and xyz as desired folder abc.xls as file to be opened.
at class FileUtilityService the method openFileUsingSambaAndIOStream is as following



connecting server and disconnection code is


inside FileOperation Class required methods are like




 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic