aspose file tools*
The moose likes Struts and the fly likes How to store the PDF file in the server side? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to store the PDF file in the server side?" Watch "How to store the PDF file in the server side?" New topic
Author

How to store the PDF file in the server side?

Simpson Kumar
Ranch Hand

Joined: Mar 19, 2008
Posts: 261
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?


Thanks,
Kumar
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Save it there?

What, precisely, is the issue?
Simpson Kumar
Ranch Hand

Joined: Mar 19, 2008
Posts: 261
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
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

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

Joined: Nov 03, 2008
Posts: 10
I would recommend looking into the Apache Commons Upload utility. Some Struts distros come with it as an example webapp.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to store the PDF file in the server side?