• Post Reply Bookmark Topic Watch Topic
  • New Topic

passing parameters to servlet from a standalone application  RSS feed

 
preethi Ayyappan
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to pass a parameter from a standalone java program to a servlet.Is this possible by opening url connection of that servlet in the standalone program?
 
Prasad Tamirisa
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah,

You can very well do it using URL class.Form a url which looks something like below.

Get an instance of the URL class with the above string as parameter. And open connection using openConnection() method.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!