File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to use Javascript to get HTTP Header variables

 
waleed atef
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

i need to know, if any one have a solution to help me in how to get header variable using javascript.

Thanks,

Waleed Atef
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64182
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which ones? Some are made available through built-in objects. But there is no general mechanism to get response headers. Unless, of course, you are asking about an Ajax response (but I don't get that impression).
 
waleed atef
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i mean that how to get header parameter from javascript code like java.

My question here, it's doable or not.

Thanks alot for your response.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If Ajax call yes, if normal page load, no.

If normal page load, have Java write it to the page.
If Ajax, read the spec.

Eric
 
waleed atef
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear

I've appended param in firefox header tool and i want to read it through javascript code, so can any one provide me an example on it.

Thanks,

Waleed Atef
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Previous answer still applies.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic