[opencms-dev] Problem including an XML form generated by "OAMP webform" in JSP files

Bozidar Ilievski bozidar.ilievski at netcetera.com.mk
Thu Mar 13 15:03:11 CET 2008


I use eclipse for editing JSP pages.
You can then manually upload JSP files to OpenCms.

You can also try this eclipse plugin:
http://www.redstardevelopment.nl/opencms/opencms/en/opencms/plugin/
It synchronizes a project in eclipse with an OpenCms Module.

Also look at the WebDav support for OpenCms (I haven't tried this yet).

Regards,
Bobi.

Territorio Jordan-V. wrote:
> Okay, I think i begin to understand how it works...
> Just to know, is there a better wayto developp a entire OpenCMS website. 
> The problem is that the JSP editor is limited wth openCMS : no syntax 
> coloration, no completion... do you know if there is a better editor or 
> some plug-in to have a better look of the code ?
> 
> Thank you for your time ^^
> 
> 
> 2008/3/13, Bozidar Ilievski <bozidar.ilievski at netcetera.com.mk 
> <mailto:bozidar.ilievski at netcetera.com.mk>>:
> 
>     Yes.
> 
>     You only need to define "head" and "foot" elements in your template.
> 
>     In the "head" element you can put the HTML head and the menu.
>     In the "foot" element you will close all open html tags (body, html).
> 
>     Something like this:
> 
>     <%@ page session="false"%>
>     <%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms"%>
> 
>     <cms:template element="head">
>     <html>
> 
>     <head>
>     <title><cms:property name="Title" escapeHtml="true" /></title>
>     <cms:editable />
>     </head>
> 
>     <body>
>     <!--
>     Include header.jsp and left_navigation.jsp here.
>     -->
>     </cms:template>
> 
>     <cms:template element="body">
>        <cms:include element="text1" editable="true" />
>     </cms:template>
> 
>     <cms:template element="foot">
>     <!--
>     Include footer.jsp here.
>     -->
>     </body>
>     </html>
>     </cms:template>
> 
>     I think this is enough to display the page.
> 
> 
>     Territorio Jordan-V. wrote:
>      > It works :)
>      >
>      > Thank you !!!
>      >
>      > So, if I want include the form in my own website, i have to create my
>      > own template, with my menus... that's the way?
>      >
>      > 2008/3/13, Bozidar Ilievski <bozidar.ilievski at netcetera.com.mk
>     <mailto:bozidar.ilievski at netcetera.com.mk>
> 
>      > <mailto:bozidar.ilievski at netcetera.com.mk
>     <mailto:bozidar.ilievski at netcetera.com.mk>>>:
>      >
>      >     Header and footer inclusion is also handled by the form.jsp file.
>      >
>      >     Look at the beginning of the file (around line 15), and you
>     will see how
>      >     the header is included:
>      >
>      >     if(showTemplate) {
>      >       // get the template to display
>      >       template = cms.property("template", "search");
>      >       // include the template head
>      >       cms.include(template, "head");
>      >     }
>      >
>      >     Also look at the end of the file:
>      >
>      >     if(showTemplate) {
>      >       // include the template foot
>      >       cms.include(template, "foot");
>      >     }
>      >
>      >     You only need to set the "template" property for your Webform
>     file.
>      >     If you don't have your own template, you can use some of the
>     templates
>      >     that sheep with OpenCms (TemplateOne or TemplateTwo for example).
>      >
>      >     You can set this "template" property either to the Webform
>     resource, or
>      >     to some of its parent folders.
>      >
>      >
>      >     Regards,
>      >     Bobi.
>      >
>      >     Territorio Jordan-V. wrote:
>      >
>      >      > I'm a newbie with opencms. So I try some scenarios.
>      >      >
>      >      > I try to make a website with registering module. But to
>     register
>      >     on the
>      >      > site, you have to answer to this form. But i'd like to include
>      >     the form
>      >      > in a page, with a header and a footer. When i make the webform
>      >     using the
>      >      > opencms interface, the result use the form.jsp, but i
>     don't know
>      >     how to
>      >      > proceed to include a header (with links and menus and
>     pictures) and a
>      >      > footer.
>      >      >
>      >      > I thought that if i just had to included the form in a jsp
>     (with
>      >     header
>      >      > and footer) the problem would be resolved, but it wasn't.
>      >      >
>      >      > Maybe I don't have the good way of thinking ^^
>      >      >
>      >      > Have you an idea about it, Or some HowTos I could use?
>      >      > (soory for my english, i'm just a poor frenchy boy ^^)
>      >      >
>      >      > 2008/3/12, Bozidar Ilievski
>     <bozidar.ilievski at netcetera.com.mk
>     <mailto:bozidar.ilievski at netcetera.com.mk>
>      >     <mailto:bozidar.ilievski at netcetera.com.mk
>     <mailto:bozidar.ilievski at netcetera.com.mk>>
>      >
>      >      > <mailto:bozidar.ilievski at netcetera.com.mk
>     <mailto:bozidar.ilievski at netcetera.com.mk>
>      >     <mailto:bozidar.ilievski at netcetera.com.mk
>     <mailto:bozidar.ilievski at netcetera.com.mk>>>>:
>      >
>      >      >
>      >      >     Hi.
>      >      >
>      >      >     Why do you need to include this XML file into your JSP
>     page?
>      >      >
>      >      >     If you only need to display the form,
>      >      >     there is already a JSP file that ships with the module,
>      >      >     and is specially designed for displaying Webforms.
>      >      >
>      >      >     You can find this file in this folder:
>      >      >    
>     /system/modules/com.alkacon.opencms.formgenerator/pages/form.jsp
>      >      >
>      >      >     Regards,
>      >      >     Bobi.
>      >      >
>      >      >
>      >      >     Territorio Jordan-V. wrote:
>      >      >      > Hi
>      >      >      >
>      >      >      > I have created a form using formgenerator module.
>     here is
>      >     the code
>      >      >      > generated :
>      >      >      >
>      >      >      >
>      >      >      > <?xml version="1.0" encoding="UTF-8"?>
>      >      >      >
>      >      >
>      >      >      > <AlkaconWebForms
>      >      >     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>      >      >     <http://www.w3.org/2001/XMLSchema-instance%22>
>      >      >
>      >    
>     xsi:noNamespaceSchemaLocation="opencms://system/modules/com.alkacon.opencms.formgenerator/schemas/form.xsd">
>      >      >
>      >      >      >
>      >      >      >
>      >      >      >   <AlkaconWebForm language="en">
>      >      >      >     <MailFrom/>
>      >      >      >     <MailTo/>
>      >      >      >     <MailSubject/>
>      >      >      >     <MailText name="MailText0">
>      >      >      >       <links/>
>      >      >      >       <content><![CDATA[<p><b>Mail Text</b></p>
>      >      >      >
>      >      >      >
>      >      >      > <p>ldqsfvbgmlsqdbfvuvbzsvbmseuvbpzeuvbpzubzmeujbzev
>     zeujv
>      >     zep zm
>      >      >     zuj zpmr zru rziu zrpmu zpmru zrpmubpzutb mrztb rzoub
>     zrpub zmjtb
>      >      >     ztptub zpmb mprzubt zutb mzjubt mqj bcvfb zteub ztujb
>      >     pmtoubnzmb mtb
>      >      >     mtubzpmb rzmtjb mrzubt t'zmob:ztkb zpmutnbâhgnjhg
>     majngàâ"(n"ja(
>      >      >     h'zmounb '-h z'mj hbmozunhzsmhn</p>]]></content>
>      >      >      >
>      >      >      >
>      >      >      >     </MailText>
>      >      >      >     <FormText name="FormText0">
>      >      >      >       <links/>
>      >      >      >       <content><![CDATA[<p><b>Form Text</b></p>
>      >      >      > <p>ldqsfvbgmlsqdbfvuvbzsvbmseuvbpzeuvbpzubzmeujbzev
>     zeujv
>      >     zep zm
>      >      >     zuj zpmr zru rziu zrpmu zpmru zrpmubpzutb mrztb rzoub
>     zrpub zmjtb
>      >      >     ztptub zpmb mprzubt zutb mzjubt mqj bcvfb zteub ztujb
>      >     pmtoubnzmb mtb
>      >      >     mtubzpmb rzmtjb mrzubt t'zmob:ztkb zpmutnbâhgnjhg
>     majngàâ"(n"ja(
>      >      >     h'zmounb '-h z'mj hbmozunhzsmhn</p>]]></content>
>      >      >      >
>      >      >      >
>      >      >      >     </FormText>
>      >      >      >     <FormFooterText name="FormFooterText0">
>      >      >      >       <links/>
>      >      >      >       <content><![CDATA[<p>Be sure you correctly named
>      >      >     it...</p>]]></content>
>      >      >      >
>      >      >      >
>      >      >      >     </FormFooterText>
>      >      >      >     <InputField>
>      >      >      >       <FieldType><![CDATA[text]]></FieldType>
>      >      >      >       <FieldLabel><![CDATA[Name your
>     color]]></FieldLabel>
>      >      >      >       <FieldMandatory>true</FieldMandatory>
>      >      >      >
>      >      >      >
>      >      >      >      
>     <FieldValidation><![CDATA[[a-z]+]]></FieldValidation>
>      >      >      >       <FieldErrorMessage><![CDATA[I said name it,
>     stupid geek
>      >      >     !!]]></FieldErrorMessage>
>      >      >      >     </InputField>
>      >      >      >
>      >      >      >     <FormConfirmation name="FormConfirmation0">
>      >      >      >
>      >      >      >       <links/>
>      >      >      >       <content/>
>      >      >      >     </FormConfirmation>
>      >      >      >   </AlkaconWebForm>
>      >      >      > </AlkaconWebForms>
>      >      >      >
>      >      >      >
>      >      >      >
>      >      >      > But the is a problem when i try to include in a JSP
>     file.
>      >      >      > This is what i try to use these commands in my JSP
>     file but i
>      >      >      > encountered problems :
>      >      >      >
>      >      >      > <%@ include file="coucou.html" %> works but display has
>      >     problem. The
>      >      >      > only things that appear on screen are texts. Box and
>      >     TextArea are not
>      >      >      > displaying and i don't know why. Even the label are not
>      >      >     diplaying. I can
>      >      >      > only see <p></p> balises.
>      >      >      >
>      >      >      > <jsp:include page="coucou.html" flush="true" />
>      >     nullpointer exception
>      >      >      > <cms:include file="coucou.html" element="body" />
>      >     sometimes work with
>      >      >      > diplay problems somentimes don't work
>      >      >      >
>      >      >      > <cms:contentload collector="singleFile"
>     param="coucou.html" />
>      >      >     Problem :
>      >      >      > javax.servlet.jsp.JspException: Error reading resource
>      >     from path
>      >      >      > "/coucou.html".
>      >      >      >
>      >      >      > Is there someone to help me?
>      >      >      >
>      >      >      > thank you
>      >      >      >
>      >      >      > --
>      >      >      > TERRITORIO Jordan-Victor
>      >      >      > Projet Asterisk - Ingénieur d'Intégration
>      >      >      > TEAMLOG – Ingenieurs 2000
>      >      >      >
>      >      >      >
>      >      >
>      >      >      >
>      >      >
>      >    
>     ------------------------------------------------------------------------
>      >      >      >
>      >      >      >
>      >      >      > _______________________________________________
>      >      >      > 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
>      >      >
>      >      >     --
>      >      >     Bozidar Ilievski | bozidar.ilievski at netcetera.com.mk
>     <mailto:bozidar.ilievski at netcetera.com.mk>
>      >     <mailto:bozidar.ilievski at netcetera.com.mk
>     <mailto:bozidar.ilievski at netcetera.com.mk>>
>      >
>      >      >     <mailto:bozidar.ilievski at netcetera.com.mk
>     <mailto:bozidar.ilievski at netcetera.com.mk>
> 
>      >     <mailto:bozidar.ilievski at netcetera.com.mk
>     <mailto:bozidar.ilievski at netcetera.com.mk>>>
>      >
>      >      >     phone +389 -2- 30 64 532 | fax +389 -2- 30 79 495
>      >      >     Netcetera | 1000 Skopje | Macedonia |
>     http://netcetera.com.mk
>      >      >
>      >      >     _______________________________________________
>      >      >     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
>      >      >
>      >      >
>      >      >
>      >      >
>      >      > --
>      >      > TERRITORIO Jordan-Victor
>      >      > Projet Asterisk - Ingénieur d'Intégration
>      >      > TEAMLOG – Ingenieurs 2000
>      >      >
>      >      > +33 4 76 61 37 77
>      >      > +33 6 30 66 54 69
>      >
> 
>      >      > jot at teamlog.com <mailto:jot at teamlog.com>
>     <mailto:jot at teamlog.com <mailto:jot at teamlog.com>>
>     <mailto:jot at teamlog.com <mailto:jot at teamlog.com>
> 
>      >     <mailto:jot at teamlog.com <mailto:jot at teamlog.com>>>
>      >
>      >      >
>      >      >
>      >      >
>      >    
>     ------------------------------------------------------------------------
>      >      >
>      >      >
>      >      > _______________________________________________
>      >      > 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
>      >
>      >     --
>      >     Bozidar Ilievski | bozidar.ilievski at netcetera.com.mk
>     <mailto:bozidar.ilievski at netcetera.com.mk>
>      >     <mailto:bozidar.ilievski at netcetera.com.mk
>     <mailto:bozidar.ilievski at netcetera.com.mk>>
>      >     phone +389 -2- 30 64 532 | fax +389 -2- 30 79 495
>      >     Netcetera | 1000 Skopje | Macedonia | http://netcetera.com.mk
>      >
>      >     _______________________________________________
>      >     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
>      >
>      >
>      >
>      >
>      > --
>      > TERRITORIO Jordan-Victor
>      > Projet Asterisk - Ingénieur d'Intégration
>      > TEAMLOG – Ingenieurs 2000
>      >
>      > +33 4 76 61 37 77
>      > +33 6 30 66 54 69
>      > jot at teamlog.com <mailto:jot at teamlog.com> <mailto:jot at teamlog.com
>     <mailto:jot at teamlog.com>>
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      >
>      > _______________________________________________
>      > 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
> 
>     --
>     Bozidar Ilievski | bozidar.ilievski at netcetera.com.mk
>     <mailto:bozidar.ilievski at netcetera.com.mk>
>     phone +389 -2- 30 64 532 | fax +389 -2- 30 79 495
>     Netcetera | 1000 Skopje | Macedonia | http://netcetera.com.mk
> 
>     _______________________________________________
>     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
> 
> 
> 
> 
> -- 
> TERRITORIO Jordan-Victor
> Projet Asterisk - Ingénieur d'Intégration
> TEAMLOG – Ingenieurs 2000
> 
> +33 4 76 61 37 77
> +33 6 30 66 54 69
> jot at teamlog.com <mailto:jot at teamlog.com>
> 
> 
> ------------------------------------------------------------------------
> 
> 
> _______________________________________________
> 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

-- 
Bozidar Ilievski | bozidar.ilievski at netcetera.com.mk
phone +389 -2- 30 64 532 | fax +389 -2- 30 79 495
Netcetera | 1000 Skopje | Macedonia | http://netcetera.com.mk



More information about the opencms-dev mailing list