ways to upload PDF in your site [closed] - java

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm using JSP/Java and Spring MVC as framework. I'm going to support uploading PDF files to my site. The site will be uploaded to a free web hosting site.
I want to know which is the best way to support the uploading the PDF files:
Save it into database?
Save it to the web server ( if this is possible )
Save it to your recommendation ( please share what you have in mind )
And also give me a link or tutorial of how may I do this ( if you suggest other than option 1 and 2 )
Thank you in advance.

Saving file into database is not recommended and i am not sure if anyone would like to do that also.
Uploading file into web server is also not a good choice because it will increase the load unnecessary.
The best option is use a dedicated space (it may be cloud or anywhere), and secure it.
You can refer to spring file upload for reference.
If you are working in localhost for development then i would suggest just use the drive other than where your sever is running. And you can mention the path in web.xml or where ever you want.

Little is achieved by putting "large blobs of binary data" (such as PDFs) into a database. The only situation where this would be justified is when the data has to be handled transactionally.
If there is nothing to be achieved by putting the PDFs into the database, then don't do it. You should be able to upload and download large documents faster if they are stored as files in the file system.
How do you do it? Well there are a variety of ways. But WebDAV offers a simple "off-the-shelf" solution ... if that is what you are after.

Recommended way is always to use a File System storage service like Amazon S3.
This application on GitHub shows you exactly what you need using AmazonS3 but uploading an image instead of a .pdf. But I am sure that you will find the example really useful.

Related

Write a program to save web-page to a computer [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to write a program to save web site when we enter web site link. What is the easiest programming language to do that. I want to save entire web site to my computer. I know there is way to write a program to save web page. But my requirement is to save entire web site. How can i do it. I just need some tips. Then i can do some research and find out a solution. Please help me to get start with my work. Thanx.
What you are trying to create is actually a download manager. It is easier to create a simple download manager in java but quite tedious to create a full fledged one.
The idea behind it is simple. Say you have a webpage with url www.example.com/index.html. to download just index.html is easy. But to download all pages of a domain or website. You have to download index.html. Then parse index.html for links that are inside domain (ie within www.example.com).You need to download all the links, and then go through all pages downloaded from links and find more links. This goes on till you have parsed all links once. So essentially you would need to read a webpage,grab links and then download those links.You need to search info on web crawler,web page parsing etc.
If you are just trying to download a website please try softwares like flashget,internet download manager etc. There are some opensource once so you could get source as well.
Please go through the links below for more info
http://www.9code.in/java-download-manager-with-full-source-code/
http://www.javaworld.com/article/2076095/core-java/download-a-website-for-offline-browsing.html
http://www.programcreek.com/2012/12/how-to-make-a-web-crawler-using-java/
How to get a web page's source code from Java

Android App with Online Database [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
i'm creating an app wherein the database are uploaded online without website, the concept of the app is like Waze app. I dont know where to start im asking for ideas and help. do i need to create a web server?how?i will mark this correct for those who can answer thanks.
This is not a simple task because it relies on many parts doing its proper job... In order to do what you want to do you need basically 5 things:
1.- Server: which will feed live information to the app.(There is a ton of servers that can be used to get this part done. If you are used to, or willing to learn php, I suggest you to start researching XAMPP (it uses Apache server running php stuff) [https://www.apachefriends.org/es/index.html]).
2.- Database: Most likely the server will need to work with information stored in some place. databases are perfect for just that. XAMPP also comes with MySQL which happens to be the most popular open source database out there.
3.- Format :You need to determine how the information will be passed from the server to the mobile device. The most common ways are: JSON which is plain text, XML that also is plain text but formatted diferently. this is important because you have to send the information from the server using this format and also your mobile devices will need to interpret the information in this format.
4.- Choose a way to send and recive the information : i would suggest Http/Ip protocol for this, as it is very common. Investigate Http requests and responses.
5.- Your device must be listening (or asking) for the content : the device will have to implement some sort of timer to ask the server for new information. This is determined by the logic and prupose of what you wish to do.
do i need to create a web server?
Yes! You need to create a web server, then, a webservice (database query etc...) which communicate between your application and your webserver. I think that all!

Remote file edit and saving without downloading/editing/uploading? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
This is a problem I've faced recently.
I have a Java application which give the facility to create user accounts and then the user can upload files to the remote server which the application is hosted.
At some point the user can do the followings to edit that file.
Download the file
do the editing
upload the file (and it will replace the existing file or keep both)
The problem is the user have to upload it to the server again. How can I avoid that.
I mean to simplify the user experience.
I think below will be a good solution.
User click the file and it will open in the relevant file editor (MS Word, Note Pad, MS PowerPoint - assume the editors are installed already )
User do the editing and just click the save in the relevant editor. (say in MS word user edit the file and click save) - then the file in the remote server will automatically updated to the edited one.
I know this is not a programming code error or something , I'm just wondering how can we achieve this ? Is there any library or a technology for this.
I heard about webDav , and its implementation like Milton.
Is these can solve this ? or any of you know a way to achieve this. I need some ideas and thoughts how i can do this. please give your kind help.
Yes, you can do this by implementing webdav support in your webapp, and Milton.io is designed specifically to allow that.
There are tutorials on the milton website showing how to do it. Takes about 20 mins
http://milton.io/
To integrate click to edit into the web browser you need to use IE. Its possible to do the same in FF and Chrome, but requires addons to be installed.

How to build a Restful web service to fetch and process a file at a given url [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
What I want to do is, given a url to a csv file, I need build a web service that takes the url as a parameter, then download the file, parse data in the file and finally visualize the data in the file, The web service is supposed to be working on any given url pointing to a csv file. I'm trying to build the web service using JAX-RS right now. Any hints on how a little more detailed architecture that could work for this purpose? Thanks in advance!
This is a very broad question, so I will answer how you would do it. I've done this before with XML and NOAA Weather Prediction data.
Make sure the URL you are parsing from contains pure .csv/.xml data, e.g. NOAA data. For testing purposes, it's good idea to download the .csv directly from the site and write code doing IO on the .csv file, but for once you're done with that, it's a much better idea to just read directly from the URL. I'm not sure what it's like for REST protocols, but for SOAP, the URL contains input parameters, so you can specify everything from the longitude latitude of a location, to date ranges, etc.
Use a CSV parsing library, or find a tutorial, like such.
Store the parsed items. You could use a multi-dimensional array for testing, and transition to a database for long-term storage and processing.
Process/visualize the data. Once you have the data structure all set, you can then get creative with visualizing the data.
Go and read some tutorials, this is a very general question. Don't expect people to write all code for your service. here is a tutorial link http://docs.oracle.com/cd/E17802_01/webservices/webservices/docs/1.6/tutorial/doc/
and here an explanation about how to download a cvs file and save in java Programatically Downloading CSV Files with Java
here a nice tut about how to parse csv via csv http://www.mkyong.com/java/how-to-read-and-parse-csv-file-in-java/

DMS (Document Management System) / File Repository / File Manager under Java EE [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I need to create a very simple DMS (Document Management System) / File Repository / file manager or whatever we might call it under Java EE.
It should permit the user to create folders and upload files into it and the folder/files information should be stored inside the database for checking which user created what (in this sense a simple file-manager which only lets one browse directories on the server's disk is not enough).
To be more explicit here's what it should be more or less:
So far I searched for canned solutions which I could use however I only found TinyDMS (http://sourceforge.net/projects/tinydms/) which is very good (picture above is a screenshot of it in action), it uses jackrabbit for file search however needs a lot of Spring framework dependencies and is a hell to be compiled (didn't succeed yet).
Then there's OpenKM and LogicalDoc but those are really complex programs which don't fit well to be included into a third party application.
Isn't there anything I can start with?
use jackrabbit DMS java base.
http://jackrabbit.apache.org/
If you don´t want to use Alfresco, Nuxeo, or other DMS, maybe you should develop your own "Light (DMS)". For that you can start with the repository; for this you could try Apache Jackrabbit or Modeshape as the lower level to manage data, files, versionong, deletion, etc. Personally, I´m using Modeshape for my graduate project beacuse of it´s documentation and ease of implementation. Then I use JAAS to manage users and its permissions for each file or folder.

Categories

Resources