It is quite easy to use logging in Java Web Start applications - normal Java logging and System.out works just fine.
Basically, to work it first should be enabled from "Java Control Panel" and later logs can be found at specific folders.
It is described in details at http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/tracing_logging.html.
Showing posts with label jws. Show all posts
Showing posts with label jws. Show all posts
Thursday, April 8, 2010
Disable cookies in Java Web Start
I was creating application for Java Web Start that works with URLConnection. At some point, I have noticed strange behavior: for same requests I was receiving different responses. Digging deeper, I found that it was sending cookies that I was creating in browser by regular site browsing.
This became interesting and I googled it and found interesting document. So using browser cookies is actually a feature and was intentionally done and worked in Java Web Start and Java Plug-in applications.
For my case it was totally undesirable and I wanted to turn it off. Fortunately, it can be done quite easily (though more complicated then it should be):
This became interesting and I googled it and found interesting document. So using browser cookies is actually a feature and was intentionally done and worked in Java Web Start and Java Plug-in applications.
For my case it was totally undesirable and I wanted to turn it off. Fortunately, it can be done quite easily (though more complicated then it should be):
CookieManager cookieManager = new CookieManager();
CookieHandler.setDefault(cookieManager);
cookieManager.setCookiePolicy( CookiePolicy.ACCEPT_NONE);
Subscribe to:
Posts (Atom)