Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing servlet in swing application

 
gayatri sabari
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to access a servlet over the network from inside my Swing application. Can anyone help me to do this?
 
Nadeem Awad
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by gayatri sabari:
I want to access a servlet over the network from inside my Swing application. Can anyone help me to do this?


You can perform an HTTP Get request to call your servlet. Here is a sample:


I think you can also perform a POST request, but I'm not sure how. You can google it.

Hope this helps,
 
gayatri sabari
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nadeem ,i have to perform some servlet validation and i have to send those results to that swing application again.i will try this code and i will reply,thank u..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic