This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JSP and the fly likes Request.ServerVariables() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Request.ServerVariables()" Watch "Request.ServerVariables()" New topic


Sumon Mukherjee

Joined: Dec 19, 2007
Posts: 12
I need the jsp equivalent of Request.ServerVariables() in asp. Please advise...
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

ASP's getServerVariables method returns the combination of a lot of things such as form parameters, querystring parameters, HTTP headers, and some TCP information, as a single collection.

All of this information is available in the HttpServletRequest object but not all jumbled up in a single method like getServerVariables.

It wouldn't be difficult, to emulate getServerVaribles on your own using the request object.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Sumon Mukherjee

Joined: Dec 19, 2007
Posts: 12
Tried getURL(), getRequestURL(),getQueryString(), getPathInfo(), but no luck...
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63547

Originally posted by Sumon Mukherjee:
but no luck...
That's not going to get you anywhere. What are you expecting and what are you getting? Making people pull teeth in order to help you isn't the best of strategies.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Request.ServerVariables()
It's not a secret anymore!