• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

How to store the PDF file in the server side?

 
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, we have a struts application to read the data and displaying a PDF file.
and we need to follow the process like in the following.

1) read the data from database and write into the PDF file.
2) store this file in a location (where ever it is)
3) on client side, when we call the particular action, the PDF file should open from the location.

I can store the file in a physical location, but I dont know how to grab that file from that place to display.

I can open the file, if the file is in server side
In the Struts-config.xml, I wrote like this and working


Here How to store the PDF file in the ("/pages/pdf") location, which is in server side?
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Save it there?

What, precisely, is the issue?
 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Im unable to store the file in the server side, but I can store into the physical location (Ex:- File path = "C:\pages\pdf")
but I need to store the file in the server side (Ex:- WebConten\pages\pdf)
I dont how to store in the server side
 
Marshal
Posts: 27214
87
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't store it inside the web application. You store it somewhere else. Create a directory on the server specifically for storing the PDFs.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would recommend looking into the Apache Commons Upload utility. Some Struts distros come with it as an example webapp.
 
keep an eye out for scorpions and black widows. But the tiny ads are safe.
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic