• 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

What file path do I need to provide in Production Server for downloading a file using Struts2

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. I am writing a function to download a file using Struts2. My application works perfectly fine and I am able to download a csv file. The only issue I am facing is that right now the file path points to my local machine. We use Linux in Production and I a  not sure if the same file path would work there too. If not then what should I give as the file so that the clients download the file over the server.
Thanks

 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

syed yousuf sadat wrote:



Does this path exist on your production machine?  Does the user your application container is running as have permission to access it?
 
syed yousuf sadat
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Honestly speaking, I don't know. The reason I gave this path was that, I thought Linux would also recognize this file path. If this is not the case then could you please elaborate this concept to me. Do I need to copy the file somewhere in Production server where it would be accessible for the clients to download it.
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

syed yousuf sadat wrote: Do I need to copy the file somewhere in Production server where it would be accessible for the clients to download it.



The file must be somewhere that the production server can get to it. Chances are, that is not your local machine.  You should probably discuss this with your production server administrator so they are aware of your requirements and can help you put things in the correct place.
 
syed yousuf sadat
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Make sense. Thanks Joe.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic