A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Spring in Action
this week in the
Get Full URL from Header?
Joined: May 13, 2001
Aug 07, 2002 16:59:00
How do I get the full url (as shown in the address bar) into my
I can use 'request.getRequestURI()'
but that only show part of the URL.
What if I want the full thing with
and ? parameters, etc.
Joined: Jul 02, 2001
Aug 08, 2002 01:21:00
use the request.getRequestURL() instead (includes
it returns a
Use request.getQueryString() to get the "a=101&b=202" parameter
Joined: Nov 06, 2000
Aug 08, 2002 05:39:00
request.getRequestURL() is available with the latest servlet/JSP API. If you are using an older version, you still have to use getRequestURI and just get the host out of the request.
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
I agree. Here's the link:
subject: Get Full URL from Header?
Logo - What Sun has to say about it
9th,10th and 11th question from chapter 10 of kathy Sierra.
How do you get the url?
IP Address of Webserver
jsf equivalent code
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014