[opencms-dev] flex: JSP and templates?

Moises at eskatoo.de Moises at eskatoo.de
Fri Aug 30 13:19:45 CEST 2002


Hi again,

ah, I see... so that is to use JSPs as templates.... nice!

But how about the other way around?
What we would need currently is to use a "standard" template for our JSP
content pages -
is that possible in version 5 beta, too? Like if you make a new JSP page in
some content folder,
assign a template to it  (just like to a standard HTML file)...?

Thanks for your help!

Best regards,
Stefan
---
eskatoo - Die Agentur für innovative Kommunikation II GmbH

Stefan Moises
Software Engineer / IT-Consultant

Frankenstrasse 152 - 90459 Nuernberg - Germany
phone +49-(0)911 / 8 18 75-73 - fax +49-(0)911 / 8 18 75-99
e-mail moises at eskatoo.de  -  web http://www.eskatoo.de


|---------+--------------------------------->
|         |           "Alexander Kandzior"  |
|         |           <alex at opencms.org>    |
|         |           Sent by:              |
|         |           owner-opencms-dev at www.|
|         |           opencms.org           |
|         |                                 |
|         |                                 |
|         |           30.08.2002 12:28      |
|         |           Please respond to     |
|         |           opencms-dev           |
|         |                                 |
|---------+--------------------------------->
  >--------------------------------------------------------------------------------------------------------------|
  |                                                                                                              |
  |       To:       <opencms-dev at www.opencms.org>                                                                |
  |       cc:                                                                                                    |
  |       Subject:  RE: [opencms-dev] flex: JSP and templates?                                                   |
  >--------------------------------------------------------------------------------------------------------------|




Hi Stefan,

> another problem we are currently encountering is this:
> it doesn't seem to be possible to use templates for JSP
> pages... is that correct?

This is true in the Flex alpha 1 release, but not longer in the 5.0 beta
1 release. We are currently preparing a (rather extensive) demo which
will show how you build a Template with JSP.

Here's a code snippet for a template from the upcoming demo. You
probably get the idea. Place this in the "/content/templates" directory.

-------------------
<?xml version="1.0" encoding="utf-8"?>
<xmltemplate>
    <!-- This describes the template -->
    <template>
        <element name="head"/>
        <element name="body"/>
        <element name="foot"/>
    </template>

    <!-- Include A JSP as "head" element: -->
    <elementdef name="head">
        <!-- This class is the same for all JSP -->
        <class>com.opencms.flex.CmsJspTemplate</class>
        <!-- Here goes the JSP file to include -->
        <template>demodefault_head.jsp</template>
    </elementdef>

    <!-- Include A JSP as "foot" element: -->
    <elementdef name="foot">
        <!-- This class is the same for all JSP -->
        <class>com.opencms.flex.CmsJspTemplate</class>
        <!-- Here goes the JSP file to include -->
        <template>demodefault_foot.jsp</template>
    </elementdef>
</xmltemplate>
---------------------

Important: In case you use JSP - Templates, you currently must set the
"export" property to "false" for the pages since JSP can currently not
be exported. It's ok to set this proprty on a folder to prevent all
files in this folder from being exported.


Best Regards,

Alex.

Alexander Kandzior
OpenCms Group / Alkacon Software










More information about the opencms-dev mailing list