What Java WebDAV client side library could you recommend?
I've recently created one that is quite easy to use:
https://github.com/lookfirst/sardine
Have you looked at Jackrabbit's?
OK I'm a bit late, but you really should check out the milton webdav server project. Its open source (apache2), mature and is actively maintained.
Its designed to allow any backend implementation to be hooked up to webdav, and many users have reported implementing it in under 4 hours for existing applications.
It supports all the usual webdav stuff like locking, custom properties, digest/basic authentication, etc. It also supports caldav and integrated with apache FTP so you get 2 protocols for the price of one!
Milton ships with a servlet and a spring controller, and it can run independently of a web container.
Milton also has a nice little webdav client library, which is ideal for desktop apps due to its observer support.
I used the client library provided by the Jakarta Slide project for a software that I developed about 2 years ago, and it worked fine. Now, visiting the site, I see that the project is no longer active for lack of developers. But the client library should still be a good choice for you. Anyway, I don't see many alternatives out there.
Try to esteem about them here: http://www.webdavsystem.com/javaserver
Did you check Sardine?
https://code.google.com/p/sardine/
https://github.com/lookfirst/sardine
Latest release 5.3 - August 2013 and available at Maven Central:
https://mvnrepository.com/artifact/com.github.lookfirst/sardine/5.3
Related
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 looking to query LDAP server to retrieve all the user entries from it. I have come across some libraries
OpenLDAP
LDAP SDK
Mozilla Directory
Apache Directory API
My requirements would be to query all users in an LDAP implementation like AD Server, ease of programming and good community around the library. I don't find a clear winner here. Can someone tell me the widely used and robust API?
The best API to use with Java is the UnboundID LDAP SDK. It's clear, complete, fully implements the LDAP standard specification, easy-to-use and understand, fully documented, thread-safe where it should be, and the standard edition is free. No other API even comes close.
see also
LDAP Examples using the UnboundID LDAP SDK
Had to dive into Java LDAP SDK market, as some old LDAP JAVA programs with SDK bugs needed to be fixed and I had lost up-to-date overview of supported Java LDAP APIs for a while. A little research has brought me to several aged overviews and this rather old thread. I thought, I'd just share my more-up-to-date SDK findings here.
As of today, this is what the Java LDAP SDK market seems to offer:
jLDAP (Novell Java LDAP SDK),
OpenLDAP Java SDK (sibling fork of Novell LDAP SDK),
Netscape/Sun Java LDAP SDK,
OpenDS LDAP SDK: All 4 repositories seem practically dead/unmaintained for several years (some of them for a decade now) now. No backing companies or active communities in sight.
Oracle LDAP SDK: Basically the former Netscape/Sun Java SDK with paid Oracle support, but otherwise not maintained either. Does not even exist in the open source world.
OpenDJ Java LDAP SDK: The backing company has moved away from the open source market, no longer maintain this SDK. The most recent SDK version 3.0.0 is already several years old and never left beta stage, the latest official release version is even older: 2.6.11. The commercial version of the SDK is said to be practically abandonned either.
ldaptive.org: some university project. A former JNDI wrapper, but now claims to have an own LDAP SDK protocol implementation. There seem to be no community or users outside of the university perimeter. Not dead, but currently unclear, what quality state to expect here. If you'd ask me, this project would have done a lot better, to spend their time backing the Apache LDAP SDK project, as no one actually needs yet another look-mom-I-also-made-an LDAP-Client-SDK in an a saturated market full of other mostly mediocre JAVA LDAP SDKs.
Apache LDAP SDK: Compared to other Apache projects, the LDAP SDK shows really slow pace. Somehow Apache LDAP seems to miss a real company backing things, it's only talented hobby enthusiasts pusing things forward. You probably do not want to start any new projects with SDK V1.0, as they state that V2.0 breaks interface code. but you probably also do not want to use SDK V2.0 yet, as it's still beta and no one knows for how much longer it will stay beta (V1 stayed beta for 6 years...). The SDK is far from being dead, it's just showing really really slow progress.
Java JNDI: Built into Java since ages and has not changed since release. Still is really ugly for coding, documentation is a mess, every task beyond basic search is an implementation nightmare, basically every project fails to properly implement it, several things are broken by design. There seem to have been a few concept ideas of a JNDI-LDAP-successor for a future JDK, but nothing has ever followed so far.
Unbound SDK: Mature, best maintained SDK, has huge amount of features, though the backing company is still nurtured from venture capital, burning money. So far it does not look like they stand on their own feet any time soon. So the long term aspect of SDK backing support is unclear. A former party pooper for the SDK in commercial projects once was its GPL license. The open source version now seems to have a LGPL license as well (that may or may not fit a project).
Spring: seems like a stable LDAP SDK, plus has the large Spring community. But less feature-rich and no bleeding edge stuff. Personally no experience yet though with this SDK.
So right now, Java LDAP seem to have a reasonable choice of four: JNDI, Unbound, Spring, Apache, each with their pros and cons. And you probably will hate JNDI a lot, as soon as you start using it.
A good advice might be, to not rush into migration projects of old SDKs and to invest into the extra effort of implementing wrapper code, to be at all able to easily switch the SDK later when needed.
Check the Apache Directory Client API it is opensource and has an active community (full disclosure: I work on Apache Directory project) and most importantly Apache Directory Client supports all basic LDAP controls including password policy and syncrepl by default unlike some commercial versions which support these in a paid version only.
You can easily add new/custom controls and extended operations if needed and it is very easy to start an in-memory Directory Server with the help of the annotation driven test framework
Take a look at this example to see how you can leverage the API and test framework for unit testing.
And otoh, if you ever need a Kerberos v5 server in your unit test, it is just an annotation away.
We use the the UnboundID LDAP SDK. It is very good and there are many examples and good support.
Poor support and maintenance for the JLDAP and Mozilla Directory APIs is why we QUIT using them.
Like the https://wiki.mozilla.org/LDAP_Java_SDK does not exist.
The JLDP sdk has not been updated in YEARS. (2009 as I recall).
There is also open source lib from Imperva https://github.com/imperva/domain-directory-controller
There You can find a pretty good examples of queries.
I'm using https://www.ldaptive.org/ in production, so far I'm pleased it's like 'ORM'
What are the different ways to create a web-application in Java? Are there tools available other than straight-up servlets?
Open source web frameworks in Java and related view technologies:
Tapestry
Apache Cocoon
Apache MyFaces
Spring MVC
Google Web Toolkit (GWT)
Java Server Faces (JSF)
Apache Struts
Turbine
Seam
Makumba
Java Server Pages (JSP)
Stripes
OpenXava
JPublish
wingS
Strecks
AribaWeb
Echo
RIFE
Anvil
WebOnSwing
Click
ThinWire
Facelets
Wicket
Check http://java-source.net/open-source/web-frameworks for more options and to read a brief overview of each one.
There are many many web frameworks for Java that allow you to build Web Applications. The vast majority are built on top of the Servlet API, but provide a layer of abstraction that you interact with instead of dealing with servlets directly
My favourite (for what its worth) is Wicket
An quite old and simple standard is CGI, and java can do that: http://www.apl.jhu.edu/~hall/java/CGI-with-Java.html
A more recommended today would be to use a web-framework. These usually abstract from the Servlet API and provide a ground for common patterns in web development.
Here is a quite long list of available choices: http://java-source.net/open-source/web-frameworks
In java there's also Facelets, JSF and many other frameworks, like Spring MVC.
JuanZe gives a good answer with the list of frameworks. Here's some more detail.
I'd say take a look at Struts, as it's one of the oldest and simplest frameworks. Struts v1 and v2 are two different beasts; Struts v1.0 was written mostly in a day, and you can learn it in an hour, and might be a very good introduction to web frameworks.
I currently use Spring, and wouldn't go back to Struts from there. The nice part of Spring is that it comes with the framework (Spring MVC), but there are dozens of other "nice to have" components that really help you out as you continue to learn 'em.
Other developers I work with complain regularly that Seam is the way to go. They've said some pretty intelligent things in the past, but I really like Spring, and our project is married to it.
Wicket also looks interesting; Spring is very heavy on XML, and Wicket gets rid of that, which is a very happy thought. That said, there's a pretty huge gain with some of the XML in Spring, so I'd worry about losing that.
As an addition, I'd take a look at Apache Commons, formerly called Jakarta Commons. It's a collection of useful libraries of stuff that probably should be included in the core Java API. Discursive has a wonderful book that walks you through it.
if you are asking about tools interface to develop a web application.i suggest eclipse coz its too convenient to use,flexible and can run on pcs with low configurations.i have just 512 mb ram and i m using it easily
As a quickstart you could download Netbeans http://netbeans.org/ , you can try almost all kinds of J2EE technologies with a preconfigured app-server and database using included sample projects. It tooks only seconds to build and run and if you like analyze the code.
and here there is another one, a very young one this time: (ยต)Micro. It is open source, Apache 2 license, and available on Github. I built this framework for fun and I was trying to port and simulate as much functionality as I could from my experience as a Sinatra/Rails developer. Cheers!
I'm writing/porting a C++ HTTP event server to Java. I'm wondering what are the best paradigms for implementing comet with Jetty, Tomcat, any other server, or natively.
Threaded
Continuations
NIO
Servlet 3.0
Scalability is an absolute must as I'm developing a new protocol that uses up to 3 concurrent connections per client.
Any help is appreciated.
PS: If possible, I would love to also see some sample code or tutorials..
We've had a lot of success with Caucho Resin's LongPoll features (the majority of the data to our UI comes in over Comet). Caucho has also added support for WebSockets, so if you have an HTML 5 client you can benefit there too.
On Linux they have some custom JNI code that talks directly to epoll, which allows the server to scale well.
Glassfish has native comet support and I thought there was WAR for comet support in tomcat from the Glassfish team. Jetty also seems to be leading the crowd. Am I misunderstanding, but why are you trying to re-implement comet in a Java app Server?
Or you can drop Comet and go WebSockets: http://www.jWebSocket.org
I've been looking into Comet myself the past couple days. My company uses Tomcat in development and WebLogic in production. We'd like to incorporate Comet without shaking up our existing application. I've been impressed with Atmosphere's APIs. It focuses on the server side, allowing for portability while taking advantage of native server features like NIO. They seem to be putting out updates every month.
https://atmosphere.dev.java.net/
It looks like SpringSource has just released a GA version of their tc Server application server.
It sounds from their description like it is a drop-in replacement for Apache Tomcat, with better "enterprise capabilities", such as "advanced diagnostics", better operations management, deployment, etc. (and of course, the support that they want to sell you as their primary business model).
So I'm curious (and I'm not sure if this is truly a SO question), but is anyone using tc Server today in any shape or fashion? Has it worked out well for you? Did you find whatever features they are adding to Tomcat to be worth it?
As I see it, the primary advantage of tcServer is in managing large clusters of load-balanced tomcats. Aside from the management/monitoring layer (which is very cool, by the way), it also has a faster database connection pooling mechanism, and a generally tweaked configuration optimised for high volume. Other than that, it's just Tomcat.
They've just released a developer edition. Have a look at this screencast which demonstrates how their diagnostics work.
MuleSoft released Tcat Server, which provides advanced provisioning, Tomcat and webapp specific diagnostics. Some of the key differences with tcserver is that Tcat Server is 100% unmodified Apache Tomcat and the diagnostics are built right into the product.
Disclosure: I work for MuleSoft, and would be happy to answer any questions on Tcat Server.
I'd also add that the "advanced monitoring" capabilities are actually available in java 1.5 (check the JDK's SNMP/JMX docs). Been using it for years with rrdtool and recently ported over to using highcharts+mongo.