This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi all, How can you retreive the context URL (in the form http://xx ort/yy/) from within the servlet? I need to be able to use it as the start of the xsl-t stylesheet url to embed in my xml data. Unfortunatly, all I have found are methods with in ServletContext, but they do not return the http:// section, only the paths from the context root or system paths. Does anyone know of a method that I can use to get the full url path?? Kind regards Simon
--<p>Bill<p>"Make it idiot proof,<br /> and someone will make a better idiot" -- ANON
Joined: Dec 10, 2002
I will answer my own question here, incase anyone else has the same problem. With much calling of every method I could find I came up with this solution. If the call from the client is in post form then this should work.
If anyone knows of an other solution that may be a bit more portable I would be greatful. Cheers Bill