Advertisement

09.18.2007 at 09:18AM PDT, ID: 22836465
[x]
Attachment Details

How to get the host name of a particular link in JSP

Asked by royalcyber in Java Standard Tag Library (JSTL) & Server Tags, Java Server Pages (JSP), Java Servlets

Tags: get, jsp, host, name

Hi Guys
 
I need to get the actual host name of the website. I tried the following code

<%String host_name =request.getRemoteHost();
     String port = request.getRemoteHost();
%>

But this code gives the Ip address associated with the host name. Would you guys know how I can get the actual host name

foe example I need to localhost from the following link. Any help would be greatly appreciated

https://localhost/webapp/wcs/stores/servlet/TaxReportingSummaryView?storeId=10001&catalogId=10001&checkInput=true&dateTextFields=haveDates&fromDate=2006-09-18+00%3A00%3A00.000&toDate=2007-09-18+23%3A59%3A59.000Start Free Trial
 
Keywords: How to get the host name of a particul…
 
Loading Advertisement...
 
[+][-]09.18.2007 at 11:25AM PDT, ID: 19915366

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.19.2007 at 12:25AM PDT, ID: 19918781

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.19.2007 at 12:26AM PDT, ID: 19918782

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Java Standard Tag Library (JSTL) & Server Tags, Java Server Pages (JSP), Java Servlets
Tags: get, jsp, host, name
Sign Up Now!
Solution Provided By: amodmulay
Participating Experts: 2
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_1_20070628