Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!