[opencms-dev] Problem with cms:enable-ade inside included jsp.file

John Bieling john.bieling at gmx.de
Fri Jul 1 12:02:51 CEST 2016


Hi Tobias,

that did indeed fix my problem, thank you very much!

Yours
John



Am 01.07.2016 um 11:56 schrieb Tobias Herrmann:
> Hi John,
>
> please check if the page directive buffer="none" is set in the second 
> included JSP. If not, it may lead to the observed issue.
>
> Kind regards,
>
> Tobias
>
> -------------------
>
> Tobias Herrmann
>
> Visit OpenCms Days 2016 Conference and Expo September 26 to September 
> 27, 2016 in Cologne, Germany http://www.opencms-days.org
>
> Alkacon Software GmbH - The OpenCms Experts
> http://www.alkacon.com - http://www.opencms.org
>
> Am 01.07.2016 um 11:41 schrieb John Bieling:
>> Hi,
>>
>> my template.jsp includes another jsp which is using <cms:enable-ade />.
>> So basically:
>>
>> template.jsp:
>> ------------------------
>>
>> <%@page buffer="none" session="true" trimDirectiveWhitespaces="true"
>> import="org.opencms.jsp.CmsJspActionElement, 
>> org.opencms.file.CmsObject" %>
>> <%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
>> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
>> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
>> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
>> <%
>>
>>      CmsJspActionElement cms = new CmsJspActionElement(pageContext,
>> request, response);
>>      CmsObject cmsObject = cms.getCmsObject();
>>
>> ... some session stuff ...
>>
>>   cms.include("other.jsp");
>>
>> %>
>>
>>
>>
>> other.jsp:
>> -------------------
>>
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>> "http://www.w3.org/TR/html4/loose.dtd">
>> <html>
>>   <head>
>>      <cms:enable-ade />
>> </head>
>>
>> <body>
>>     Stuff
>> </body>
>> </html>
>>
>>
>> What happens: The generated code of the enable-ade is placed before the
>> DOCTYPE definition at the very top. This breaks some css things.
>>
>> If I change the code, so everything happens inside template.jsp, the
>> generated code of the enable-ade is placed inside head.
>>
>> Is there anything I can do to get it working using the include?
>>
>>
>> Thanks
>> John
>>
>> _______________________________________________
>> 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
>>
>>
>>
>
> _______________________________________________
> 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
>
>
>




More information about the opencms-dev mailing list