• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Struts(JPF+NetUI+Bea Workshop)-IIS-How to get domain name from URL (Internet & Intranet )

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Experts,

We are using JPF,Net UI,Bea Workshop, Weblogic server in our application. And we setup our application in IIS server. We provide two URL's,one for access through internet and another one is for access through corporate network. For example, for public url : http://www.myapp.com/app/login/login.jsp, for intranet url : http://10.192.88.166/app/login/login.jsp. so we need to read the url domain name to recreate the url in our application...
how to get the www.myapp.com string in Httpserveletrequest object. While access through public url, we are getting base url as http://10.192.88.166/app/login/login.jsp. 10.192.88.166 is my webserver and IIS is running there. Please help me , how to get domain name from browser request. i tried to use java.net package...i can get only ip address not domain name.While i use javascript, i can get full browser object using window.location.host,window.location.protocol,window.location.href. Is there anyway to get browser url in java application.

Thanks in Advance
Regards
Raju
 
selvaraju sellamuthu
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We solved by using request.getHeader("Referer"); to get browser requested URL.
Thanks and Regards
Selvaraju
 
Wanna see my flashlight? How about this tiny ad?
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic