File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes How to connect UNIX to download PDF file from the folder path Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to connect UNIX to download PDF file from the folder path " Watch "How to connect UNIX to download PDF file from the folder path " New topic
Author

How to connect UNIX to download PDF file from the folder path

suresh dhanapal
Ranch Hand

Joined: Aug 18, 2005
Posts: 40
    
    1
Hi,
Can you please tell me how to connect unix folder to download pdf, I am using struts to display the PDF file in jsp

Thanks
Suresh
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8996
    
    9

Connecting to another computer has nothing to do with Struts and everything to do with how your computers and network are configured. What connection options do you have (Samba, NFS, SFTP, HTTP)?


[How To Ask Questions On JavaRanch]
suresh dhanapal
Ranch Hand

Joined: Aug 18, 2005
Posts: 40
    
    1
Joe, I need to connect through java program through my application code,obviously connection would be HTTP

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42913
    
  68
It is actually far from obvious that HTTP would be the method of connection, and HTTP is one of the methods I would have considered rather unlikely.

If it's HTTP, why can't the client access the file directly (assuming that the client is an HTTP browser, but that seems likely since we're talking about a Struts application) ? Does the Struts app live on a publicly accessible server, whereas the HTTP server where the PDF file lives is not publicly accessible?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42913
    
  68
It just occurs to me that we may be misunderstanding what you're asking, and you may have misunderstood what Joe said. Is it actually the case that this PDF file is on a server other than the web app? Or are they on the same server, and all you're asking is how a Struts web app can stream that file to the client?
suresh dhanapal
Ranch Hand

Joined: Aug 18, 2005
Posts: 40
    
    1
My direct question is how we can access PDF files from UNIX folder(residing on different location) to show it in web page when the user request for that file.

Thanks,
Suresh
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42913
    
  68
"different location" means different server? Or a different directory on the same server as the web app?
suresh dhanapal
Ranch Hand

Joined: Aug 18, 2005
Posts: 40
    
    1
Hi Ulf,
right now we decided to put different directory on the same server.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8996
    
    9

Have a look at StreamResult
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to connect UNIX to download PDF file from the folder path