Welcome to Dream.In.Code
Become a Java Expert!

Join 150,031 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 1,597 people online right now. Registration is fast and FREE... Join Now!




Getting the Requested URL

 
Reply to this topicStart new topic

Getting the Requested URL

gyanadipta_sahu@satyam.com
4 Jun, 2008 - 03:31 AM
Post #1

New D.I.C Head
*

Joined: 3 Jun, 2008
Posts: 1

Hi

i am trying to get the requested Url in my servlet class with the below code:

String url=httpRequest.getRequestURI().toString();

But i am unable to retrive the complite URL as my input URL is
https://localhost:9080/ESM/Verif/ESMHome.do...amp;country=JPN

but uRl String parameter giving me only.
/ESM/Verif/ESMHome.do

can any one please help me how to retrive the complite url
https://localhost:9080/ESM/Verif/ESMHome.do...amp;country=JPN
User is offlineProfile CardPM
+Quote Post

1lacca
RE: Getting The Requested URL
4 Jun, 2008 - 03:47 AM
Post #2

code.rascal
Group Icon

Joined: 11 Aug, 2005
Posts: 3,822



Thanked: 12 times
My Contributions
use getRequestURL and getQueryString
or see HttpUtils.getRequestURL(javax.servlet.http.HttpServletRequest).
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 09:37PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Java Help!

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month