Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

accessing servlet in a swing application

 
gayatri sabari
Greenhorn
Posts: 7
  • 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
  • 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
  • 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic