[opencms-dev] Templates using XML- and JSP-includes return strange getUri-results
Michael Nebel
michael.nebel at intares.net
Sun Mar 23 13:23:53 CET 2003
Hi,
I have a strange effect, when using XML and JSP-includes
within the same document.
- the "master-Template" welcome has three includes:
... stuff before ...
<!-- Navigation starts here -->
<cms:include file="../elements/intares_nav.jsp"/>
<!-- Navigation ends here -->
...
<!-- Main page body starts here -->
<cms:include file="../elements/bodyloader.xml" element="body" />
<!-- Main page body ends here -->
<!-- Right Nav starts here -->
<cms:include file="../elements/intares_para.jsp"/>
<!-- ende parameter -->
... stuff after....
- both JSPs look pricipal the same in the beginning:
...
com.opencms.flex.cache.CmsFlexRequest req =
(com.opencms.flex.cache.CmsFlexRequest) request;
com.opencms.file.CmsObject cms = req.getCmsObject();
String filename = cms.getRequestContext().getUri();
String paraname = cms.getRequestContext().getFolderUri();
java.util.ArrayList paralist =
CmsJspNavElement.getNavigationTreeForFolder(cms, paraname, 1, 4, "");
out.println("<!-- debug: "+paraname+" - "+filename+" - "+
cms.getRequestContext().getSiteRoot()+" - "+
req.getRequestURL()+"-->");
...
- the getUri before and after the XML-Include looks as such:
... stuff before
<!-- debug: /Public/Produkte/TQS/ - /Public/Produkte/TQS/index.html
- /default/vfs - ...
...main body...
<!-- debug: /system/modules/org.intares.welcome/jsptemplates/ -
/system/modules/org.intares.welcome/jsptemplates/welcome -
/default/vfs - ..
.. stuff after
Confusing for me is, that befor calling the body-xml the
getUri returns "/Public/Produkte/TQS/", but afterwards the Uri
is the location of the welcome-Template
("/system/modules/org.intares.welcome/jsptemplates/").
My question:
Has anybody a hint for me, how I can get the right
getRequestContext().getUri() after calling the body.xml? I'm
just thinking about writing a body-loader as jsp to get ride
of the xml-Include, but that doesn't make sense to me.
The configuration:
- platform (Linux, Apache, Tomcat, Open cms 5.0 rc2, Mysql)
Regards for any help and greetings from the sunny Hamburg (Germany)
Michael
--
Michael Joachim Nebel
michael.nebel at intares.net
More information about the opencms-dev
mailing list