Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Does any analogy of ASP's SERVER VARIABLES exist?

 
Roman Rytov
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:-)
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the request has a getHeader(String headername) method which you can use to retrieve any HTTP headers sent to the server. For example:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic