[opencms-dev] Link resolving with OpenCms API

Uhlig, Roman roman.uhlig at knve.de
Fri Dec 16 17:10:43 CET 2005


Hi,

I'd like to resolve a link with the CmsJspActionElement.link(String)
method with a scriptlet within a JSP page like that:

CmsJspActionElement cms = new CmsJspActionElement(pageContext, request,
response);
java.util.List nav_element_list =
cms.getNavigation().getNavigationForFolder(cms.link("/sites/default/mysi
te/eng/index.html"));

Unfortunately the cms.link() method returns
"/opencms/opencms/sites/default/mysite/eng/index.html" instead of
"/sites/default/mysite/eng/index.html", which causes the
getNavigationForFolder() method to fail. If I hardcode the path,
everythings works fine, but I have of course no link resolving in the
online project.

Any ideas someone?

Thank you in advance,
Roman Uhlig



More information about the opencms-dev mailing list