Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
suresh dhanapal
Ranch Hand
Posts: 40
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9300
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)?
 
suresh dhanapal
Ranch Hand
Posts: 40
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe, I need to connect through java program through my application code,obviously connection would be HTTP

 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 40
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"different location" means different server? Or a different directory on the same server as the web app?
 
suresh dhanapal
Ranch Hand
Posts: 40
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf,
right now we decided to put different directory on the same server.
 
Joe Ess
Bartender
Posts: 9300
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at StreamResult
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic