Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

get the absolute url from JSP or servlet

Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have small problem, I have my web application deployed on SUN ONE application server and working fine, it is now moved behined iplanet gateway which is changing the URLs of images and forms, ..... to something secured like this.

Before gateway:
http://servername ort/context/images/hello.swf

After gateway:
https://gatewayname/http://servername ort/context/images/hello.swf

I use root relative context path in all my application, and I used to get the context name and append it to my code as something like this:
<PARAM NAME="Src" VALUE="<%= contextPath %>/images/flashs/movie.swf">

but I found that th gateway doesn't change these to the https mode at all, so the swf file never appears, so I want to get the full absolute path from serverside in a variable and make it
<PARAM NAME="Src" VALUE="<%= absolutePath %>/images/flashs/movie.swf">

Is there any API that does this so I can use it or any other suggestion?

This problem also persists with IBM access manager.

Thanks for yr help
    Bookmark Topic Watch Topic
  • New Topic