• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic