<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Thanks Paul,<div><br></div><div>This did the trick:</div><div><div>                CmsFlexController controller = CmsFlexController.getController(req);</div><div>                CmsObject cms = controller.getCmsObject();</div><div><br></div><div>                // resolve possible relative URI</div><div>                newlink = OpenCms.getLinkManager().getOnlineLink(cms, link);</div><div><br></div><div><br></div><div><b>For those who are interested:</b></div><div><br></div><div><ol><li><span style="font-size: 12pt;">I created a new class that inherits CmsJspTagLink and overrides doEndTag() to accomplish this</span></li><li><span style="font-size: 12pt;">I also had to create a tld file and an exportpoint to /WEB-INF</span></li><li><span style="font-size: 12pt;">A Tomcat restart was in need</span></li></ol></div><div><br></div><br><div><hr id="stopSpelling">From: flakstad@npolar.no<br>To: opencms-dev@opencms.org<br>Date: Mon, 24 Nov 2014 13:54:35 +0100<br>Subject: Re: [opencms-dev] generating absolute path (with http://) using cms:link<br><br><style><!--
.ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal {
font-size:12.0pt;
font-family:"Times New Roman","serif";
}

.ExternalClass h3 {
font-size:13.5pt;
font-family:"Times New Roman","serif";
font-weight:bold;
}

.ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink {
color:blue;
text-decoration:underline;
}

.ExternalClass span.ecxMsoHyperlinkFollowed {
color:purple;
text-decoration:underline;
}

.ExternalClass p {
font-size:12.0pt;
font-family:"Times New Roman","serif";
}

.ExternalClass span.ecxHeading3Char {
font-family:"Cambria","serif";
color:#4F81BD;
font-weight:bold;
}

.ExternalClass span.ecxEmailStyle19 {
font-family:"Calibri","sans-serif";
color:#1F497D;
}

.ExternalClass .ecxMsoChpDefault {
font-size:10.0pt;
}

.ExternalClass div.ecxWordSection1 {
}

--></style><div class="ecxWordSection1"><p class="ecxMsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">Hi Tom,</span></p><p class="ecxMsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;"> </span></p><p class="ecxMsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">This is probably what you’re looking for: </span></p><p class="ecxMsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;"> </span></p><p class="ecxMsoNormal" style="text-indent:35.4pt;"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">org.opencms.main.OpenCms.getLinkManager().getOnlineLink(myCmsObject, myResourcePath);</span></p><p class="ecxMsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;"> </span></p><p class="ecxMsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">(I’m sure there’s an EL equivalent, but can’t help you there.)</span></p><p class="ecxMsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;"> </span></p><p class="ecxMsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">Also, see the link manager’s other methods: <a href="http://files.opencms.org/javadoc/core/org/opencms/staticexport/CmsLinkManager.html" target="_blank">http://files.opencms.org/javadoc/core/org/opencms/staticexport/CmsLinkManager.html</a></span></p><p class="ecxMsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;"> </span></p><p class="ecxMsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">Cheers,</span></p><p class="ecxMsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">Paul</span></p><p class="ecxMsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;"> </span></p><div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm;"><p class="ecxMsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";"> opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org] <b>On Behalf Of </b>Tom Wolf<br><b>Sent:</b> 24. november 2014 13:13<br><b>To:</b> opencms-dev@opencms.org<br><b>Subject:</b> [opencms-dev] generating absolute path (with http://) using cms:link</span></p></div></div><p class="ecxMsoNormal"><span lang="EN-US"> </span></p><div><div><p class="ecxMsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";">Hi all,</span></p></div><div><p class="ecxMsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";"> </span></p></div><p class="ecxMsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";">Is this possible? or should I create my own </span></p><h3 style="background:white;"><span style="font-family:"Arial","sans-serif";color:#222222;font-weight:normal;"><a href="http://files.opencms.org/javadoc/core/org/opencms/jsp/CmsJspTagLink.html" target="_blank"><span style="color:#660099;text-decoration:none;">CmsJspTagLink</span></a> </span><span style="font-size:12.0pt;font-family:"Calibri","sans-serif";color:#222222;font-weight:normal;">extension?</span><span style="font-family:"Arial","sans-serif";color:#222222;font-weight:normal;"></span></h3><div><p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"> </span></p></div><div><p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">Thanks</span></p></div></div></div><br>_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</div></div>                                     </div></body>
</html>