Comments for Java Hair http://www.java-hair.com A Blog about Java, IT, and Music Mon, 29 Jun 2009 23:11:29 +0000 http://wordpress.org/?v=abc hourly 1 Comment on Generate an Java-based Ajax-enabled Web App in 5 Minutes by News Generate an Java-based Ajax-enabled Web App in 5 Minutes | Web 2.0 Designer /2009/06/23/generate-a-j-web-app-in-5-minutes/comment-page-1/#comment-87 News Generate an Java-based Ajax-enabled Web App in 5 Minutes | Web 2.0 Designer Tue, 23 Jun 2009 22:21:35 +0000 /?p=331#comment-87 [...] The rest is here: Generate an Java-based Ajax-enabled Web App in 5 Minutes [...] [...] The rest is here: Generate an Java-based Ajax-enabled Web App in 5 Minutes [...]

]]>
Comment on XML Schema Design: Part 1 by Posts about xml as of May 13, 2009 | Shirasmane /2009/04/07/xml-schema-design-part-1/comment-page-1/#comment-83 Posts about xml as of May 13, 2009 | Shirasmane Wed, 13 May 2009 14:14:02 +0000 /?p=191#comment-83 [...] dictates… (Budget: fixed $250, Jobs: Flash, Graphic Design, XML) Go to Source Share and Enjoy: XML Schema Design: Part 1 - java-hair.com 04/07/2009 Introduction This post and the posts that follow are to provide some of [...] [...] dictates… (Budget: fixed $250, Jobs: Flash, Graphic Design, XML) Go to Source Share and Enjoy: XML Schema Design: Part 1 - java-hair.com 04/07/2009 Introduction This post and the posts that follow are to provide some of [...]

]]>
Comment on Installing JDeveloper 11g on Ubuntu 8.10 by Robert Nocera /2009/01/05/installing-jdeveloper-11g-on-ubuntu-810/comment-page-1/#comment-82 Robert Nocera Thu, 23 Apr 2009 16:56:24 +0000 /?p=144#comment-82 Performance has been one of it's weaknesses in general in my opinion. Each release has been getting better and better for the most part, especially since the Tech Previews. I have not used it extensively on Linux yet to be able to let you know what the performance really is like. Performance has been one of it’s weaknesses in general in my opinion. Each release has been getting better and better for the most part, especially since the Tech Previews.

I have not used it extensively on Linux yet to be able to let you know what the performance really is like.

]]>
Comment on Installing JDeveloper 11g on Ubuntu 8.10 by jplmelanson /2009/01/05/installing-jdeveloper-11g-on-ubuntu-810/comment-page-1/#comment-81 jplmelanson Wed, 22 Apr 2009 14:45:23 +0000 /?p=144#comment-81 Did you use it intensively with a Fusion app? I am curious about the performance of the beast under linux because under windows it's really weak on that point. Did you use it intensively with a Fusion app?

I am curious about the performance of the beast under linux because under windows it’s really weak on that point.

]]>
Comment on Accessing Twitter with Java using HttpClient by Robert Nocera /2008/11/19/accessing-twitter-with-java-using-httpclient/comment-page-1/#comment-80 Robert Nocera Wed, 01 Apr 2009 14:04:58 +0000 /?p=137#comment-80 Thanks for that, jpswain, I hadn't had time to look into it yet. Thanks for that, jpswain, I hadn’t had time to look into it yet.

]]>
Comment on Accessing Twitter with Java using HttpClient by jpswain /2008/11/19/accessing-twitter-with-java-using-httpclient/comment-page-1/#comment-79 jpswain Wed, 01 Apr 2009 01:05:48 +0000 /?p=137#comment-79 Ok, I feel silly coming back to answer my own question, but I figured it out, for anyone who might want to use httpclient 4.x: The important thing is that your HttpPost must use the BasicHttpParams and can't have useExpectContinue set to true. This is what caused a 417 Expectation Failed response for me. Like this: // >> Set Hostname hostname = "twitter.com"; // >> HttpParams HttpParams params = new BasicHttpParams(); // NOTE This following line cannot set true or you get error 417 Expectation Failed. HttpProtocolParams.setUseExpectContinue(params, false); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); standardHttpPostParams = params; // >> AuthScope authScope = new AuthScope(hostname, 80); // >> Credentials credentials = new UsernamePasswordCredentials(username, password); // >> Client client = new DefaultHttpClient(getStandardPostParams()); applyCredentials(client); Ok, I feel silly coming back to answer my own question, but I figured it out, for anyone who might want to use httpclient 4.x:
The important thing is that your HttpPost must use the BasicHttpParams and can’t have useExpectContinue set to true. This is what caused a 417 Expectation Failed response for me.

Like this:
// >> Set Hostname
hostname = “twitter.com”;
// >> HttpParams
HttpParams params = new BasicHttpParams();
// NOTE This following line cannot set true or you get error 417 Expectation Failed.
HttpProtocolParams.setUseExpectContinue(params, false);
HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
standardHttpPostParams = params;
// >> AuthScope
authScope = new AuthScope(hostname, 80);
// >> Credentials
credentials = new UsernamePasswordCredentials(username, password);
// >> Client
client = new DefaultHttpClient(getStandardPostParams());
applyCredentials(client);

]]>
Comment on Accessing Twitter with Java using HttpClient by Robert Nocera /2008/11/19/accessing-twitter-with-java-using-httpclient/comment-page-1/#comment-78 Robert Nocera Mon, 30 Mar 2009 01:03:35 +0000 /?p=137#comment-78 Actually I haven't tried it with 4.x I was using 3.1 at the time. Actually I haven’t tried it with 4.x I was using 3.1 at the time.

]]>
Comment on Accessing Twitter with Java using HttpClient by jpswain /2008/11/19/accessing-twitter-with-java-using-httpclient/comment-page-1/#comment-77 jpswain Sun, 29 Mar 2009 05:44:09 +0000 /?p=137#comment-77 Just curious if you tried getting this to work with http-client 4.x (http://hc.apache.org/httpcomponents-client/index.html) I have been able to get it work ok with the GET requests on the Twitter API, as well as the POST ones. The problem is that with the POST ones I have to encode the params into the URL myself. Using the methods in the client examples did not work. Just curious. Thanks for posting how to do it with the 3.x client! Jamie Just curious if you tried getting this to work with http-client 4.x (http://hc.apache.org/httpcomponents-client/index.html)
I have been able to get it work ok with the GET requests on the Twitter API, as well as the POST ones. The problem is that with the POST ones I have to encode the params into the URL myself. Using the methods in the client examples did not work. Just curious.
Thanks for posting how to do it with the 3.x client!
Jamie

]]>
Comment on JavaFX Flashcard Example Updated for 1.1 by JavaFX Example - FlashCard Game | Java Hair /2009/03/25/javafx-flashcard-example-updated-for-11/comment-page-1/#comment-73 JavaFX Example - FlashCard Game | Java Hair Wed, 25 Mar 2009 14:22:49 +0000 /?p=201#comment-73 [...] Note: An updated version of the source code for JavaFX 1.1 is available at this post. [...] [...] Note: An updated version of the source code for JavaFX 1.1 is available at this post. [...]

]]>
Comment on What’s in a name? by Recent Links Tagged With "vgo" - JabberTags /2008/04/09/whats-in-a-name/comment-page-1/#comment-72 Recent Links Tagged With "vgo" - JabberTags Sat, 07 Mar 2009 23:48:51 +0000 /2008/04/09/whats-in-a-name/#comment-72 [...] public links >> vgo What’s in a name? Saved by bvibes on Wed 25-2-2009 Is PR a Waste of Money? Saved by PAR1138 on Sat 14-2-2009 [...] [...] public links >> vgo What’s in a name? Saved by bvibes on Wed 25-2-2009 Is PR a Waste of Money? Saved by PAR1138 on Sat 14-2-2009 [...]

]]>