aspose file tools
The moose likes Servlets and the fly likes How to open File on server Using JCIFS or any other method Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "How to open File on server Using JCIFS or any other method " Watch "How to open File on server Using JCIFS or any other method " New topic
Author

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

Kr. Pallav
Ranch Hand

Joined: Mar 06, 2010
Posts: 32

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.




~|>@//@\/~
Kumar Pallav
-------------------
SCJP 5: 86 %, SCWCD: 91%
Kr. Pallav
Ranch Hand

Joined: Mar 06, 2010
Posts: 32

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




 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to open File on server Using JCIFS or any other method
 
Similar Threads
jcifs smbfile how to execute file
Need Help Reading/Writing an Image using Spring MVC
Login + password
Error inTransfering file to the remote system
connecting to shared folder in windows