• Post Reply Bookmark Topic Watch Topic
  • New Topic

Http Header Passing!  RSS feed

 
Al Swensen
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey everyone,

I am trying to do a little experiment with HTTP Headers. I would like to
add a custom HTTP header in a JSP page( say post.jsp) and then use POST method to pass these headers into another JSP page ( say test.jsp).
Does it sound like a lofty dream or can it really be done? Any suggestion would be highly appriciable.

Thank you in Advance

A R.K
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the JavaDocs for URLConnection and HttpURLConnection in the java.net package. There you will find methods for examining and setting request headers.
You must use the setRequestMethod("POST") in HttpURLConnection in order to do a POST as the default is GET.
Bill
 
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!