[opencms-dev] flex: JSP and templates?

Moises at eskatoo.de Moises at eskatoo.de
Fri Aug 30 13:49:35 CEST 2002


Hi,

thanks for your help, Alex!

So there is no way to use a "normal" XML template for the JSP content
pages?
The reason I'm asking is this:
we got a frametemplate for our whole website and so we'd like to be able to
use this
same frametemplate for our JSP content pages, too...

Could the 2 approaches you've mentioned ("include page" / JSP-Templates
defined in XML) be
combined with frames / frame templates?

Thanks again 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 13:19      |
|         |           Please respond to     |
|         |           opencms-dev           |
|         |                                 |
|---------+--------------------------------->
  >--------------------------------------------------------------------------------------------------------------|
  |                                                                                                              |
  |       To:       <opencms-dev at www.opencms.org>                                                                |
  |       cc:                                                                                                    |
  |       Subject:  RE: [opencms-dev] flex: JSP and templates?                                                   |
  >--------------------------------------------------------------------------------------------------------------|




Stefan,

> 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)...?

Try it like this:

------------------------
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms"  %>

<cms:include page="demodefault_head.jsp" />

Some HTML stuff.

<cms:include page="demodefault_foot.jsp" />
------------------------

Note: You can not use the WYSIWYG Editor on this pages.
Use the XML approach show below for that.
Oviously, the head / foot JSP files can be shared between XML and JSP.

In case want you "assign" the target of the include with
a property, this is unsupported in the 5.0 beta 1.
Maybe it will make the final.

Regards,

Alex.

Alexander Kandzior
OpenCms Group / Alkacon Software


> 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