[opencms-dev] External link to same host:port
Rodriguez, Adrian
A.Rodriguez at comundus.com
Fri Mar 27 11:45:10 CET 2009
Hello Pere,
The following code snippet should give you a string of the form http://myhost.sample:8000/ . Let us know if it does the work for you.
CmsObject cms;
CmsSiteManager.getCurrentSite(cms).getServerPrefix(cms, "/");
Regards,
_________________________________________
Adrián Rodríguez
Junior IT-Berater
comundus GmbH
Schüttelgrabenring 3, D-71332 Waiblingen
Telefon +49 7151-50028-20
E-Mail a.rodriguez at comundus.com
Internet www.comundus.com
Geschäftsführer Klaus Hillemeier
Amtsgericht Stuttgart, HRB 264290
comundus ist ein Unternehmen der IT EXCELLENCE Group
_________________________________________
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Pere Torrodellas
Sent: Friday, March 27, 2009 9:44 AM
To: OpenCms Mail List
Subject: [opencms-dev] External link to same host:port
Hello,
I need to create an OpenCMS External Link for our navigation menu to point to another application in the same server, without specifying the host:port because it must work in different hosts. In a regular html page I can do this with a link of the form:
<a href="../myOtherApplication">My Link</a>.
and in a regular jsp with:
response.sendRedirect("../myOtherApplication");
The trouble is that unless I specifically include html://myHost:myPort in the External Link, OpenCms insists in prepending "/opencms/opencms/..." to whatever I put in the Link URL, so it doesn't work.
Being an EXTERNAL link, shouldn't OpenCms use the URL as defined, without any change? Can someone suggest how to solve this (other than with an ugly patch in the navigation menu building code)?
Thanks!
Pere
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20090327/23ab90fe/attachment.htm>
More information about the opencms-dev
mailing list