[opencms-dev] How to show a page with data submitted from a form

Alexandre Magaz Graça alexm at asic.udl.cat
Thu Aug 19 12:02:42 CEST 2010


Hi,

Sorry for the delayed response, I've been in holidays.

Al 29/06/10 13:39, En/na Steve Bryan ha escrit:
> Hi
>
> As an alternative to loading template from the JSP - you could just submit
> to a regular xmlpage (ie action="result.html"). In OpenCms 'html' pages are
> not static and can run jsp code via the template.
>
> You could write a new template for this page or adapt the existing one, to
> do the processing you describe, since the template can run sections of jsp
> to check parameters etc.
>

I don't sure if I understand you. Do you mean I can put code in a 
xmlpage? If it is possible, how? I tried adding JSP code, but it didn't 
work. Or what you mean is that the xmlpage is associated with a template 
which can run code when it's loaded? If that's the case, I'm not sure I 
see the advantage. When I submit the form I want the submitted fields to 
be shown in the result page, there's nothing else, so the xmlpage would 
be empty and the template would hold all the JSP and HTML code to show 
the fields.

> In our sites we never have jsps including template - we always have xmlpages
> and these either include content elements, or run jsp, according to logic in
> the main template controlled by page properties (eg 'jsp-body=xxx').
>

What is this jsp-body property? What do you do with it?

Thanks,
Àlex

> Steve
>
> -----Original Message-----
>
> Date: Mon, 28 Jun 2010 13:41:43 +0200
> From: Alexandre Magaz Gra?a<alexm at asic.udl.cat>
> Subject: [opencms-dev] How to show a page with data submitted from a
> 	form
> To: opencms-dev at opencms.org
> Message-ID:<4C288A77.3050901 at asic.udl.cat>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi,
>
> I have an HTML page (page with free text) with a form and I would like
> the data submitted through it to be displayed in another page. My idea
> was to have something like this in the HTML page:
>
> <form ... action="result.jsp">
>
> Then make the JSP process and display the submitted data. The thing is I
> can't find any way of loading the template from the JSP so it looks like
> any other page in the web site.
>
> Is there any way of doing this? Or is my approach just wrong?
>
> I'm using OpenCms 7.0.5.
>
> Thanks,
> ?lex
>
>
>
>
> _______________________________________________
> 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