File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to store the PDF file in the server side?

 
Simpson Kumar
Ranch Hand
Posts: 261
  • 0
  • Mark post as helpful
  • send pies
  • 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?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Save it there?

What, precisely, is the issue?
 
Simpson Kumar
Ranch Hand
Posts: 261
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Paul Clapham
Sheriff
Pie
Posts: 20171
25
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Andy Lileston
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic