aspose file tools*
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
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:
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Does any analogy of ASP's SERVER VARIABLES exist?