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.
Related
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 6 years ago.
Improve this question
In our organization, We have one server in which one folder Log/Response is there. In this folder so many files will be there (XML file). Now I want to write a program to find all XML files which has a 'keyword' in Java, if possible. And after finding all such file it should return all files name. Here 'keyword' will be given from client (means user will open one URL/keyword from his browser).
So how can I achieve this thing? Which technology, language and tool I need to use? If I write a program then where exactly I should put it?
You can start from JSP/Servlet as starting point. JSP/Servlet will be communication point between user and server infrastructure where a list of files is located.
To search necessary file: as simple solution you can scan all files in necessary directory. But it will be slow. As more advanced solution, you should use some full text search engine(search will be fast).
Of course, JSP/Servlet will be deployed in servlet container such as Jetty or Tomcat.
That is all :)
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
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 am attempting to build a database that will allow a user to upload their music to be accessed by someone else/third party. How would I create it so that the music can be uploaded to a database but providing a path for it to be accessed from where it is stored?
As in A Band upload “Song” and it is then streamed by A Fan.
If it can't upload to a database I need to upload it to a server.
We are building the back end in Java and the front end in HTML.
We are also using Glassfish and Netbeans for writing the code.
You can store files in a BLOB field in a database for example. Another possibility would be to store them directly on the file system, but it has its problems (such as the lack of metadata).
Then you'll need to figure how you want to map each file, for example http://myserver.com/Artist/Album/Songname or http://myserver.com/listen?uniqueid=743.
File upload servlets are available all over the web, so that shouldn't be a problem. The rest is up to your programming skills (this might be too big of a project for you).
Then you'll just need to connect those things together, and that's the part where you start to program (or hit the Google hard).
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
Hi I want to create a small web application which will take inputs such as 80 and 120 and return the GCD of those numbers. I want to write the logic in Java. When the user enters 80 and 120 and clicks on calculate button, the values must be passed to the algorithm and return the answer to be displayed on the application again. How do I link the java algorithm to the html page in order to achieve this? Kindly suggest. Is there no other way of doing this other than creating a Java applet for this and deploying it on the application? Kindly help.
Use "Applets" if you want the Java code to run in the users browser and not on a remote server.
Applets are, however, a waning technology due to the numerous attacks that has gone through the JVM to avoid the security checks in the browser, so your users will most likely not see the experience you want them to. Additionally I believe that the ability for the Java program to interact with its surrounding page has been crippled again for security reasons.
Your best bet is to use Java for server side code only (which it is quite fine for - Google Application Engine is perhaps the easiest way to get started) and to use JavaScript for client side code.
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.