upload files directly from local folder, using browser - java

i have to upload large number of files to server, directly from my pc, using only web browser.
which is best way to achieve that?
do i need some java applet, or is it possible to achieve woth php/jquery?
will it be unsecure if i try with php script that works with ftp connection?
thank you in advance!

There's various ready-made plugins on doing file upload on jquery.
Doing this kind of uploading hacks is not an enjoyable experience, so people enjoy using ready-made solutions.
Here's few:
Ajax File Upload Plugin
Multiple File Upload Plugin
jQuery forms plugin this posts your files through an iframe to get the effect :
you can also try this
You can search more from jquery's plugin -site.

If your only web browser is mozilla firefox, then try fireftp addon plugin, it works similarly as normal FTP app.

Related

Implement document repository for web application

Im currently looking to implement a document repository for a web application (i.e. a user opens a document and saves it directly on a server). I've done some research and found WebDAV that has support for this (www.webdav.org).
However, WebDAV seems to lack firefoxsupport unless you download and use a extention. I'm looking for a way to accomplish this without the need for a 3rd party extention
Questions:
How can this be accomplished with webDAV without a 3rd party extention?
Is there another lib/way to accomplish this?
John, thats right you can launch documents in the appropriate editor (eg Word, Excel) directly from IE but to do the same in FF or Chrome requires some sort of extension.
Note that with webdav your users can browse for documents on the server as if they are on a normal drive, and open them using normal tools such as windows explorer or the file open dialog.
I routinely assist customers implementing this with my webdav server library product - http://milton.io
In Spring Framework you can enable support for multipart upload and then just use the standard java form upload functionality from any web browser to upload the document to your web server.

Client based solution for upload entire folders to an Servlet

Im currently writing a web application, where a user should be able to select an folder and upload all of its content to an servlet.
The idea is, that a user can select a folder, the folder and its content will be sent due a post request to the servlet. The servlet takes them, parses the structure and saves the structure in a database. (Filenames , foldernames..etc) (Thats also why, i cannot pass the files directly to the ftp server).
Afterward the servlets connects to an FTP Server, where the files will be stored permanently.
The Web Application uses JavaEE (Apache Tomcat 7.0, Servlet 3.0 API)
Currently Im using JUpload to achieve this, but in fact I've read that it is highly advised against using Java Applets, because of security issues. Also JUpload is not intended to use with Servlet 3.0 API, but with a little hack it works.
A normal input file form is not sufficient for this need.
Now I'm wondering, because i didnt find any other solution, which can achieve this. I've heard about some Flash Solutions, but im not familiar with flash. And also Flash has some security issues, like Applets.
Is there any other solution to solve this ?

Uploading a file from applet to server

I have an applet which records sound. This applet is integrated in VAADIN application using AppletIntegration addon. The applet runs just fine. Now, I have to upload that recorded file to my server, on which the vaadin app is running. How could I do that. Any solution , any ideas ?
Thanks.
Emm...
You can use HttpComponents its HttpClient + FileUpload libs combination;
For more detailed information you can read this and this examples
P.S.
Please report if that helps
Good luck

how to use Alfresco Sharepoint protocol in my java web application

I have an existing Java web application with document and spreadsheet files in Microsoft Office format.
I want to provide Sharepoint-like edit online functionality to allow user to edit files in Word and Excel and save them to the server.
I try this with the edit link generated from Alfresco but it only works in IE.
So do I have to use some cross-browser library for ActiveXObject support?
Or is there any easy way to embed the document edit link from Alfresco into my web application?
And for the document to be accessible by the protocol:
Do I have to use Alfresco services to upload my documents?
Or can I embed Alfresco server or Alfresco's VTI Jetty server into my application to serve my documents?
EDIT
So there is not any cross-browser ActiveX
After read Alfresco's action.js, I find out that there is something called Sharepoint plugin.
I have no problem generating the edit link now
EDIT 2
Microsoft Office works fine with normal WebDAV server, so there is no need for embedding Alfresco in my web application
There should be no need for any special code within the browser. As Gagravarr said, the links should work fine when Office is installed on the client.
Although it can be done, most likely you do not want to embed an Alfresco repository (with or without Jetty) within your application and use its CMIS and/or RESTful HTTP interfaces to work on content. Embedding a repository means introducing various dependencies. I see no reasoning in your scenario.

How to run jar Files in web Application

Now I have two .jar files: one is a chat Client and the other one is the chat Server. They are running fine on my desktop application, but now I want to upload them to run on my website. What is the best method for doing this? I have the following files:
chatclient.jar
chatserver.jar
Can some one please advise on how to put them in my web page without having to download them when a user clicks on them?
You do not provide enough information.
What would you like to achieve?
What technologies are you using inside the JARS?
Why not package the server jar with a web application ?
Is your client a desktop application, if so, why not to put it in the client's classpath?
Maybe consider having the client implemented in JavaScript using jQuery for example and some web sockets technology,
or maybe using some java web framework or tookit like GWT or Apache Wicket?

Categories