im searching for informations how to implement a service in our servlet based java web application which can handle online editing (reading / editing / saving) of some common file types like the programs of the office suite via webdav.
We have a tomcat 7 running and using webdav already for mounting folders on client computers (implemented by an colleague) which works fine.
Now im having the request to research ways to implement this online editing features (for example open a .doc file in our webapp, edit the file in word and save it automaticly in our webapp) and couldn't find that many informations/howtos about this topic.
From what i could find so far i could see that using this webdav feature some response header values needs to be set and a own servlet needs to be implemented.
But im still not sure where to start and if im right...
Does anybody knows any good resoures for this? (documentations, simple webapp example, ...whatever)?
You should use Milton, its intended for exactly the purpose you describe. Its pretty simple to implement, you create annotatated methods which make the information in your web application available via webdav. This includes file and folder browsing, as well as uploading, downloading and locking (required for MS Office)
There are tutorials on the milton website which guide you through the implementation process.
Here's a simple hello world implementation from the first tutorial:
https://github.com/miltonio/milton2/blob/master/examples/tuts-anno1/src/main/java/com/helloworld/HelloWorldController.java
Milton comes with a free community edition which supports DAV level 1 only. That will work with most 3rd party webdav clients like Bitkinex, Cyberduck, etc. But for compatibility with operating system webdav clients, including Win7, MacOS, MS Office, you need the enterprise edition which is available on a commercial license.
Please see the milton site for details - http://milton.io
(I'm the author)
Related
The company i work for needs to validate/certificate all stored PDF files and save different versions of the PDF's.
and so i am trying to make our file system/logic be CMIS compliable, because the validation is going to be made by a third party.
The filing logic we have now is based on paths + GUID, these values are saved in a data base. Then we have a couple of WS that get and set the PDF.
i am a .net Visual studio guy, and the tutorial in OpenCMIS Server Development Guide - 2nd Edition is for eclipse and I cannot get it to work.
is there any other CMIS server tutorial? it would be better if it was in .net but I will be happy with any other tutorial.
Thanks
PS: I already have the NCMIS project.
Can anybody point me in the right direction for instructions on setting up the following items on a Windows development PC?
Setup a MySQL database.
Setup an Apache webserver, a framework plus an IDE so that I can write RESTful APIs using Java and JSON.
I am using this to write a native Android and IOS mobile app that will store and retrieve data from the MySql database using the RESTful APIs on the Apache web server.
I have searched through several tech books, Google and Stack Overflow but cannot find anything that contains the above specific items. Within Stack Overflow, the following two links proved useful but do not give the specific items that I need. Android - Ruby on Rails - MySQL AND Best practice selecting database for mobile app
If you are planning to develop RESTful APIs using a Windows development PC, you could consider some of the available software bundles like XAMPP (https://www.apachefriends.org/index.html), which include an Apache distribution containing MariaDB (successor of MySQL, you can work with MariaDB as you would in MySQL), PHP (server-side language), and Perl (not neccesary) in a single Windows installer. Then, once you install it, you will have a complete web development environment up and running.
Then, considering that you develop your APIs using PHP as the server-side programming language (which I strongly recommend you as it is the most widely used language for this purpose), several additional decisions have to be taken, in terms of deciding about:
The IDE to develop in. When working with PHP, I recommend you PHPStorm IDE (https://www.jetbrains.com/phpstorm). The best in my humble opinion. However, quite complex and not very easy, but it completely worths learning.
The PHP framework. Unless you want to manually program your APIs (completely madness), you will have to use one of the many available PHP frameworks. In this case, I recommend you Laravel Framework (http://laravel.com). As far I have seen and worked, the best present and future option concerning PHP development. You could then install some RESTful API specific package in top of Laravel to speed up the development, like Dingo/API (https://github.com/dingo/api).
I insist this is just my recommendation, but you have to know that behind all that languages and frameworks there is a quite long and hard learning curve.
Good luck anyway!
1) To install MySQL on Windows refer to this official MySQL guide.
You will need to download and then extract the zip file (I would recommend the Community Edition). You will have all the details you need in the link above. Note that the .msi installer for Windows is no longer available for newer versions of MySQL.
2) Since you are going to use Java, you do not need the Apache web server (httpd) but you need Apache Tomcat as a servlet container (or other alternatives like Glassfish, JBoss as full Java EE application servers).
For building RESTful Web APIs in Java, Jersey is very good option (https://jersey.java.net).
Finally, as an IDE you can use anything, the most popular being Eclipse, NetBeans and IntelliJ IDEA.
I am working on a small Java Swing based application, and want to add a decorative feature in it to sync files with Google Drive. But, all the documentation / discussions about Google API's that I see talks about putting this code into a web application. Also, the credentials of the client on https://cloud.google.com/console require the origin URL, without which the API will not work.
I know I can either embed a Jetty or take the hard way of sending and receiving HTTP requests. But either would be an overkill for this petty application that I am making. So, I was wondering if there is a way to include a Jar file that just lets me login and then access the folders on the Google drive.
Do you know of one? Is this possible with the existing API's? Thanks for your help!
If you have a look at the detailed installation instructions then there is a section for general purpose java applications. That is your case.
The following are the jars from the dependencies folder required for general purpose Java 5 applications (or a newer compatible version of each dependency):
google-api-client-1.17.0-rc.jar
google-oauth-client-1.17.0-rc.jar
google-http-client-1.17.0-rc.jar
commons-logging-1.1.1.jar
gson-2.1.jar httpclient-4.0.3.jar
httpcore-4.0.1.jar
jackson-core-2.1.3.jar
jsr305-1.3.9.jar
protobuf-java-2.2.0.jar
xpp3-1.1.4c.jar
You can use the GooglePromptReceiver to ask the end user to paste the authorization code from the browser to your application. You can find examples in the samples. The cmdline samples apply to your case.
I've been programming in PHP and ASP.NET for a while now. When doing PHP, I've always used XAMPP to test my websites. I'm wondering (since I'm learning Java) if there are equivalent services around?
Furthermore, I know this is sort of an open question, but how would you make a basic page in Java, just a basic 'Hello World' web page.
You can actually still use XAMPP. You just need to install tomcat. Here is a great screen cast on how to do it: http://www.youtube.com/watch?v=TUV_jPdq7fc.
If your a mac user you can try MAMP (whcih I prefer) and follow http://blog.mirotin.net/22/tomcat-on-mamp-the-simple-way. To get Tomcat going.
You might want to learn about programming in JSP and Servelets. JSP s are kinda like php in that they emit html out.
Also the server would be tomcat.
It would be best if you download Eclipse for EE developers. You can also try Netbeans. a sample servelet
You may read about servlets which is the basis for web applications in Java. There are many web frameworks built on top of them.
I always recommend Grails to anyone getting started with java/the web. It's more important to grasp the patterns, lifecycle, and working with requests and responses than learning the actual language. Learning Grails has got me from hobbyist developer to IT employee working with ATG - one of the most obscenely challenging web frameworks there are.
Grails includes everything you need to get started: local server, scaffolding (that's your ticket to Hello World), database access, dependency injection, the list goes on. It's built on top of Spring, Hibernate, Sitemesh, etc, which are all well-known and excellent frameworks that are being used in production.
Grails is written with Groovy, a language written on top of the JVM not far from Java.
Happy coding!
i seems to be new to the platform nd new to java but would like to suggest what i have gained till now that for developing a java page we can have any of the two servers downloaded(Weblogic or tomcat). weblogic is fully implementation of classes whereas tomcat has partial implementation. Then for the next step that we require is a source file(java file),and html file and a xml file and these all needs to be placed in a root directory as like the source file,html file and a folder named WEB-INF to be placed parallel.
Inside WEB-INF folder needs to create classes folder where our java class file will be kept.
then needs to create a .war file and deploy it over weblogic to get our desired page display.
thanks......
I am developing a web service in GWT which needs to be able to read and write files on the server.
Initially I was just going to dedicate a directory on the server which will be accessed via the GWT Server. However as this is deployed to Tomcat, I am unsure of the problems that could arise or if it is even possible.
I would like a way for the GWT application's server side to have access to a Subversion server. Where files generated on the fly in the GWT Client side are sent to the server, the file is created and commited to subversion. Therefore, should someone want this file (which is a configuration file) they can then have access to it again by checking it out, etc.
Is this possible? Subversion sounds like the ideal solution however I am unsure of the problems.
JavaHL is an official part of the Subversion project.
Here is a page describing the basic difference between JavaHL and SVNKit: http://help.collab.net/index.jsp?topic=/org.tigris.subclipse.doc/topics/faq_subclipse.html (click "What is an adapter? What is JavaHL?")
There are several Java librarys that provide an API to Subversion Servers. Several years ago I used one, but I can't recall its name, however SVNKit is a popular one.