JackRabbit Webdav Client is compatible with Httpclient 3.0 - webdav

I have used Jackrabbit webdav client for caldav function with Httpclient 3.x. now i want to upgrade the Httpclient 4.x. how can it be done in simple way

It needs changes in Jackrabbit. See open ticket: https://issues.apache.org/jira/browse/JCR-2406

Related

How to use Apache Ignite Rest api With Java in Eclips

Can any one explain How to use Apache Ignite Rest API With Java in Eclipse with example?What the jetty server and its use in Apache ignite?
Ignite starts Jetty server internally to serve your requests. You should provide provide Jetty XML [1] and set it to ConnectorConfiguration.jettyPath path property. Please refer to docs for more information [2].
[1] https://apacheignite.readme.io/docs/rest-api#section-sample-jetty-xml-configuration
[2] https://apacheignite.readme.io/docs/rest-api#section-general-configuration

NTLM authentication using Angular2

In my client web application, I need to authenticate with the server using ntlm protocol. While using Angular1, with the $http service get request, the browsers (chrome, edge) were doing all the 3 steps of the NTLM authentication by prompting user for username/password.
However, with Angular2, using the http service that comes with Angular2, the browser (chrome,edge) just return 401 and do not do the subsequent steps (they do not even prompt the user for credentials).
How do I make browser do the ntlm authentication for me while using Angular2 ?
Please do not suggest the ntlm javascript library.
I'm new to StackOverflow. If I haven't given sufficient info or repeated the question, sorry about that.
Thanks in Advance.
"withCredentials" needs to set true in headers to make it work. My code is working now.
let options = new RequestOptions({ headers: headers, withCredentials: true });
I don't believe the problem is with NTLM or in your coding efforts. According to Anton Bessonov, a very reputable SO community member, some modules in Angular2 are just not production-ready yet, while Angular1 is a very stable code release, and my advise is to stick with Angular1 that for the foreseeable future. Ref: angular 1 vs angular 2 for new project

sun.net.www.protocol.http.HttpURLConnection - when will support http method PATCH?

I fail to use sun.net.www.protocol.http.HttpURLConnection (JDK v6, and also v7) when trying to send PATCH requests. It happens in getOutputStream() methid, in which there is a validation check that validates only POST or PUT methods are allowed. But what about PATCH? it should be valid too.
Can someone tell when this will be available?
Can someone tell what can I do instead? Any other kind of Java library?
Thanks,
M.
The JDK HttpURLConnection doesn't support the HTTP PATCH method in JDK6, JDK7 nor JDK8.
No official JDK roadmap shows this item for the moment.
You can use Apache HTTPClient 4.2+ or AsyncHTTPClient.

How do I implement client side http caching like a browser?

I use a RESTFul service as a backend to my frontend. The service sets expires/etag/lastmodified headers on it's responses.
What I'm looking for is a client-side(favorably java) library which can fetch data from the service and cache it in a pluggable caching backend like ehcache.
What I also want to be able to do is automatically prime the cache using background worker threads as soon as an entry is invalidated. Also, it should be smart to do conditional GETs.
I've come across
http://hc.apache.org/httpcomponents-client-ga/tutorial/html/caching.html
Is there any other library anyone knows about? Isn't this a fairly common problem?
The 4.0+ version of the Apache HttpComponents library comes with HTTP 1.1 cache support. You can use this with the Spring RestTemplate restful client as follows:
CacheConfig cacheConfig = new CacheConfig();
cacheConfig.setMaxCacheEntries(1000);
cacheConfig.setMaxObjectSize(8192);
HttpClient cachingClient = new CachingHttpClient(new DefaultHttpClient(), cacheConfig);
ClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(cachingClient);
RestTemplate rest = new RestTemplate(requestFactory);
The situation with client side HTTP caches in Java is not particularly good. It is a non-trivial problem that has not been attacked by most of the HTTP client library developers.
I think that is changing slowly, but I cannot provide a definite pointer. A good way to start is to look at the various implementations of JAX-RS that come with a client side API such as Jersey (this has no client side cache). It might be that Restlet has one or Restfulie, please check.
Here is something I found via Google:
http://xircles.codehaus.org/projects/httpcache4j
You can also try to roll your own but you have to be careful to understand the caching headers (including Vary:) to get it right.
RestEasy features a client side caching mechanism which is trivial to get up and running if you are using such client.
RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
YourService proxy = ProxyFactory.create(YourService.class, url);
LightweightBrowserCache cache = CacheFactory.makeCacheable(proxy);
You first create a client proxy instance, then wrap it around the cache. That's it.

Can I use the flash.net.NetConnection over https

Is it possible to use the flash.net.NetConnection object to connect to my Flash remoting enabled web application over HTTPS within Tomcat or any other servlet container?
I am using the SpiceFactory cinnamon project for amf remoting and have searched for examples of using HTTPS but see only the reference to a proxy type in the NetConnection object.
If someone could provide a reference or example that would be awesome. Or if it is not possible using the flash.net.NetConnection object are there any recommendations of how to configure HTTPS for the spicefactory cinnamon library.
According to the creator Jens Halm, it should just work out of the box.
http://www.spicefactory.org/forum/viewtopic.php?t=407
flex https works fine , if you use self signed certificate end user needs to add the public key manually to the trusted store, by directly connecting to the site using https://...
and accept the certificate.
second way is run the connection over http and do the encryption / description manually using
as3crypto - flex http://code.google.com/p/as3crypto/ and php openssl

Resources