This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Servlets and the fly likes Does any analogy of ASP's SERVER VARIABLES exist? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Does any analogy of ASP Watch "Does any analogy of ASP New topic
Author

Does any analogy of ASP's SERVER VARIABLES exist?

Roman Rytov
Ranch Hand

Joined: Jun 04, 2001
Posts: 75
For those who came from ASP enviroment what's the analogy with SERVER_VARIABLES in servlets?
Is there any way do get all information sent by a browser like broser type, operating system and so forth. I found how to get host address and a few others. But in ASP was a collection of all such variables. I bet there is one in JSP/SErvlets:-)


SCJA, SCJD, MCSD
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

the request has a getHeader(String headername) method which you can use to retrieve any HTTP headers sent to the server. For example:
 
jQuery in Action, 2nd edition
 
subject: Does any analogy of ASP's SERVER VARIABLES exist?