[opencms-dev] Templates using XML- and JSP-includes return strange getUri-results
Alexander Kandzior
alex at opencms.org
Sun Mar 23 21:45:35 CET 2003
Michael,
this is a known bug that has already been fixed in the current post RC2
CVS version. The final 5.0 will not have this bug.
Best Regards,
Alex.
Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com
> -----Original Message-----
> From: owner-opencms-dev at www.opencms.org
> [mailto:owner-opencms-dev at www.opencms.org] On Behalf Of Michael Nebel
> Sent: Sunday, March 23, 2003 1:24 PM
> To: Mailingliste Opencms
> Subject: [opencms-dev] Templates using XML- and JSP-includes
> return strange getUri-results
>
>
> 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