[opencms-dev] Cannot use a template with several page elements fora JSP

HuyTran at c-mg.net HuyTran at c-mg.net
Wed Feb 13 05:19:24 CET 2008


Hi,
I think you have to set the template of your JSP to the template as well.
I'm not fully understand this issue but I did it and it worked for me.

Regards

Huy

-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Marc Schlegel
Sent: Wednesday, February 13, 2008 3:12 AM
To: The OpenCms mailing list
Subject: [opencms-dev] Cannot use a template with several page elements fora
JSP

Hi

I am running in an error when I am including the head- and the 
foot-elements of my template into a jsp-file. The error says something 
about VFS taget already included.
I searched the web and found out that it's usually a syntax error 
causing the problem...well in my case, I have to remove my multiple page 
elements (body, text1, ..., text4) and it its working (obviously jsps 
doesn't support page elements)

My template structure is actually the same that is provided by the 
documentation

<cms:template element="head">
... inclusion of head, headimage, nav_left, and so on
    <div class="content">
</cms:template>

     ----> here the problem starts <------------
        <cms:template ifexists="body">
            <div class="element"><cms:include element="body" 
editable="true"/></div>
        </cms:template>
        <cms:template ifexists="text1">
            <div class="element"><cms:include element="text1" 
editable="true"/></div>
        </cms:template>
        <cms:template ifexists="text2">
            <div class="element"><cms:include element="text2" 
editable="true"/></div>
        </cms:template>
        <cms:template ifexists="text3">
            <div class="element"><cms:include element="text3" 
editable="true"/></div>
        </cms:template>
        <cms:template ifexists="text4">
            <div class="element"><cms:include element="text4" 
editable="true"/></div>
        </cms:template>
     ----> here the problem ends<------------

<cms:template element="foot">
    </div>
... including foot
</cms:template>

When I remove the code for the multiple page elements, I can compile the 
JSP, but then my HTML files are missing this feature. I don't understand 
this error, cause I am only including head and foot!?

Someone have a clue?
Thanks

_______________________________________________
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/mailman/listinfo/opencms-dev





More information about the opencms-dev mailing list