HTTP client : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

HTTP client
If you want to write an Applet or application or Java Web Start app, that automates what you would do with a browser, you need to speak HTTP (Hypertext Transfer Protocol) client protocols. You need to be able to GET and POST. You want to be able to talk to webservers to fetch files, talk to CGI (Common Gateway Interface) server to send and receive data or to servlet wombs to send and receive data. Sometimes you want to analyse the responses. Sometimes you just want the browser to render it. Marty Hall’s book is the best place to learn how to do this.
book cover recommend book⇒Core Web Programming, second editionto book home
by Marty Hall and Gary Cornell 978-0-13-089793-0 paperback
publisher Prentice Hall 978-0-613-92274-6 hardcover
published 2001-06-03
1250 pages. Also has some simple RMI examples. This is a great doorstop of a book. It has a few chapters on client-server programming in Java and a section of that is on CGI. I have looked at hundreds of Java books and found nothing that deals in depth with client side Java talking to CGI, except Marty’s book. It is really very simple and he does an excellent job of explaining it. Marty has posted all the source code examples from the book for anyone to use. These contain updates and errata fixes you don’t get on the CD-ROM that comes with the book.
Australian flag abe books anz abe books.ca Canadian flag
German flag abe books.de amazon.ca Canadian flag
German flag amazon.de Chapters Indigo Canadian flag
Spanish flag amazon.es Chapters Indigo eBooks Canadian flag
Spanish flag iberlibro.com abe books.com American flag
French flag abe books.fr amazon.com American flag
French flag amazon.fr Barnes & Noble American flag
Italian flag abe books.it Nook at Barnes & Noble American flag
Italian flag amazon.it Kobo American flag
India flag junglee.com Google play American flag
UK flag abe books.co.uk O’Reilly Safari American flag
UK flag amazon.co.uk Powells American flag
UN flag other stores
Greyed out stores probably do not have the item in stock. Try looking for it with a bookfinder.
The file IO Amanuensis will generate code for you to handle simple HTTP situations.

You can do your work via general purpose HTTP-client libraries. These are probably overkill in most cases. You would spend more time learning these packages than you would learning how to accomplish the same thing more efficiently with raw sockets or Java’s built-in HTTP using java.net.URLConnection, java.net.HttpURLConnection, javax.net.ssl.HttpsURLConnection and javax.net.ssl.HttpsURLConnection, However, if you have a complex task, check them out.

The main problem with Jakarta HTTPClient is the download is about 3 MB. This is on the plump side for including in an Applet download. You want to get the jar pre-installed at the client in the ext directory or in the Java Web Start cache. The advantage is it behaves the same way on every browser and it handles most of the client-server interactions at a higher level. You could, of course, just study the code for use in a stripped down version. It is not based on top of Oracle’s HttpURLConnection, so fixes a number of its problems, e.g. being able recover from a server sending you invalid cookies.


This page is posted
on the web at:

http://mindprod.com/jgloss/httpclient.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\httpclient.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[18.223.32.230]
You are visitor number