Save a PDF file of Sharepoint in a directory in java - java

I am working in a jsp file. I have a lot of files available in my Sharepoint intranet with link like this :
http://myIntranet.eu/my%pdf%1.pdf
I want saved the pdf in a folder in my server. This will help me then to merge all PDF.
I had already merge pdf in java, but I don't know how I can save this PDF on my server.
Can you please help me on how to do that.

If there is no web service or rest service from sharepoint to get the pdf, you can try to use an http client http://hc.apache.org/httpcomponents-client-ga/ to make request to sharpoint on java server to get the pdf file. Maybe you need authentication.

Related

how to read and save a server-side pdf with adobe in a client-side web browser? (plugin, applet / java servlet, ...)

My need is:
read a pdf present on a server to display it in a web browser
save the modifications of the pdf (made by the user) on the server
Currently, I'm using an independent applet that uses a servlet to open a connection between the client and the server. This allows you to read and save the pdf as a byte stream.
I need to do it with Adobe.
Do you know how I can do this? (Plugin, ...)
Thanks
environment: tomcat, java, jsp, internet explorer

Secure way to store client information and send back to client - java spring mvc

I am developing web service for a mobile application.As a part of this, I need to create some confidential reports and store it in the server and send it back to client on request as links (from which the file can be downloaded) . The requirement is , they should be able to open and view the documents in mobile.
If I have to send the file links, I should be having it in a web application which provides a public url . But does that make the reports secure ?
Can I send it as multipart file instead of url? In that case the problem is hybrid (phonegap ) platform cannot directly access the files. Is there any way to do it on phonegap?
If I use any encryption technique , may be like encrypting the url , the actual url can still be seen from the browser which opens inline .
Can anyone suggest a effective way to do send confidential documents to mobile ?
You can try creating and storing the report structure in PDF format on the server. Most browsers on mobile open up pdf files directly within the browser.
Since these are PDF files, you can password protect these and only clients who know the password can view the files.
Alternatively you can have a login filter, so that whenever a client hits your web service, he first enters some valid credentials to gain access to the document.
Encrypting the URL gives no benefit as the resource you intend to secure is the information in the document served back to the client.

Upload file to a general website application

I want to upload a file to a general website.
It seems I'll have to use HTTP requests which I can obtain through http://www.fiddler2.com/.
But I'm a complete beginner in handling HTTP or webrequests. Could someone guide me into a good tutorial on HTTP requests using C++ or Java?
Most websites are in need of a login for example. Also, does a general website accept those http request to upload a file? For uploading a file to a general website it seems you will need a login handler, get the correct request to upload the file and then upload it. To get those correct requests, do I have to see what that specific site asks?
The goal is to upload a file to a general website of choice and expand from there on to more websites.
Thanks in advance!

How to get an attached file from document context (handle request for uploaded file) domino

I am new to domino.
I trying to handle a file upload request in Java agent of domino.
I assumed that it should be an embedded object in document context, but it is NOT there.
I don't know any other way, Is there a way to get the file which is sent as a post request? How does the domino handles it.
thanks
The simple solution to uploading files is just to create a Form containing a FileUpload field and then move or process the file in the QuerySave agent. Don't think you can upload files to and web agent.
Good links:
How To: Upload Files To Domino From Flex
Adding Your Own File Uploads to Forms
/Not soo much newb anymore
Most likely the attachment is embedded into a RichText element in the document. To access it, iterate through the document.items and find an item of type RICHTEXT. Then you can check it for embedded objects.
There is a useful domino object map located here
/Newbs

I want to copy an excel file from one location to other URL server location

I want to copy/move an Excel from local machine/given path to Server location.
The server location , we manually uploads the Excel file but i want to do it autmatically by using Java files.Can i do it , if so please give me a suggestion on it.
How do we skip those uploading mechanism which we do manually.
thanks in advance
VSRK
If you upload it via a web form, you can use Apache HttpClient to programmatically create the request sent to the server and upload the file. You will need to handle by yourself any authentication needed before the upload, store any cookies the server sends you, and do any post-authentication navigation the web page requires. You will also need to recreate the upload request exactly as the web browser sends it, parameters and all.

Categories