• Post Reply Bookmark Topic Watch Topic
  • New Topic

Sending Request Parameters  RSS feed

 
sasi kala
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

i have a requirement to send request parammeters to outside Url with out redirecting to that url in java

waiting for u r reply

Thanks in advance
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this in a servlet or JSP?
If you need to POST or GET a URL in the course of your processing without actually wanting it display the results of that POST/GET, have a look at the HttpUrlConnection class. If it's something else you're trying to do, describe in more detail what it is.
 
sasi kala
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for u r response

i have used URL Class

the code will look like this

String url="http://www.xyz.com?name=abc";

URL url = new URL(url);
Object obj= url.getContent();

this will send the requestparameters to the specified url
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by sasi kala:
thanks for u r response

i have used URL Class

the code will look like this

String url="http://www.xyz.com?name=abc";

URL url = new URL(url);
Object obj= url.getContent();

this will send the requestparameters to the specified url

Your intent with this follow up is not clear to me. Did you solve the problem? Or are you asking for futher help? If the later, you need to ask a clear question so we can understand what you need help with.

Layne
 
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!