Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

accessing servlet in a swing application

 
gayatri sabari
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can any one suggest how to access a servlet through a swing application
 
ak pillai
author
Ranch Hand
Posts: 288
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use URLConnection/HttpURLConnection class to connect. please find the sample code below. The key thing here is that, even if you do not get anything back from the servlet, you need to read from the input stream because of request/response paradigm.


 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might also want to look at http://jakarta.apache.org/commons/httpclient.
[ March 15, 2006: Message edited by: Ben Souther ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic