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 ?
Related
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.
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?
I've read some articles on the Internet that this is not possible. To communicate own SQL database that is located on other server from GWT application. Jetty doesn't allow it.
I found a way how to perform it but it's not very cosy. I have client and server part inside GWT. The server has to communicate with MySQL database on localhost. So I've written an ant script to build a war that I can launch on Apache Tomcat server. It works perfectly there but I'm not able to debug the code effectively.
Do you have some advices how to perform this task? I was thinking of writing the clienty only in GWT and find some waz how to communicate my own server written outside the GWT. I've found Apache Thrift for GWT but this edited library of thrift seem not to work properly.
Thank you very much for your answers:)
It is possible to communicate with a database from a GWT application. The client side has to call the methods of the server via GWT-RPC, which can communicate with any database.
Maybe Jetty does not support it (have not tested it personally) but you can develop your web application using Apache too. There you can access the database the same way as from any web application:
You will need the mysql-connector-java-5.1.20-bin.jar file (downloadable from: http://dev.mysql.com/downloads/connector/j/ ), and restart the server added to the $CATALINA_HOME/common/lib directory.
OR added to the WEB-INF/lib folder of your web application.
You can find tutorials online of how to develop an application using Tomcat instead of Jetty. For example: https://wiki.auckland.ac.nz/display/BeSTGRID/Deploying+GWT+to+Tomcat+in+Eclipse
Reshi, stop and think about how applications really work. Nobody provides web pages with javascript to read/write databases, that would be crazy and unsecure. Servers are always in themiddle of all communication in this case. You need to create services that run inside your server, one of these services will be a database layer.
Javascript cant create network connections and read/write binary data, thus it would be insane to attempt to get the gwt compiler to compile any jdbc drvier and more.
Jetty does NOT stop us from connecting to a database. All you have to do is to follow the MVP model way. Although MVP is better bet against all hurdles, at a minimal point, you would have to try not having SQL code on the client package.
I am trying to create a web application which will allow the user to upload a file. The file will be encrypted and transferred to a web service via SOAP. The web service will carry out simple operations such as 'storeFileToCloud(byte[])' and 'downloadFile(string)'.
So far, using Google App Engine, I have created the web services, however, I'm not sure how to encode the file using SOAP. I've also created the form for the user to upload his/her file, but I'm stuck on what to do after this. Any tips or guides will be extremely helpful.
The tools I'm using include Java, Google App Engine and Eclipse Indigo.
JAX-RPC uses xsd:base64Binary. See the JAX-RPC Spec, chapter 10. You could probably do worse than copying them. Be aware that the size of the data will expand by about 33%.
I am looking for a java based CMS that exposes an API for external file upload.
So for instance I have a Tomcat server with a running CMS. I also have a (standalone) client that needs to add content to the CMS automatically (without user interference).
I already looked into Liferay (using Jackrabbit) but there is no way to upload documents/files from a client.
Does anyone know of a java CMS where this is possible ?
Thanks!
Coenos
If you are ready to take time in coding then you could make use of Liferay webservices to create a client yourself. Liferay exposes its core api as web service, using which you can do most of the things. To see the list of services that Liferay exposes check this url
http://localhost:8080/tunnel-web/axis
Replace localhost:8080 with yours.
To know more about this check out this wiki link
http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Web+services+-+Manage+Users,+Organizations,+User+Groups,+and+Roles+via+SOAP