cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <>
Subject RE: XSP help
Date Wed, 19 Jun 2002 18:35:17 GMT
> From: []
> Hello all, first post to this listserv :)  I'm having a little trouble
> learning how to write XSPs. 

Please start learning XSP writing with reading samples which are
provided with the Cocoon. 

There are several things which you got wrong in your XSP. Once you
compare your XSP with the samples, it will be obvious to you what is

For database queries, take a look at ESQL logicsheet XSP sample and
SQLTransformer sample.


> I want to perform a very simple task, yet
> really can't find many examples of XSPs anywhere on the web that will
> me accomplish my task.  What I would like to do is write an XSP that
> display a text area and a submit button and will then perform a
> query with the contents of the string retrieved from the text area.  I
> really have no real idea of how to start.  I was basing myself on the
> upload example in Cocoon but getting nowhere.  I'm using Tomcat 3.2
> Cocoon 2.0.  So far what I have is something like this that I hope
> some sense:
> <?xml version="1.0"?>
> <?cocoon-process type="xsp"?>
> <xsp:page
>   language="java"
>   xmlns:xsp=""
>   xmlns:xsp-request=""
>   xmlns:xsp-response=""
>   xmlns:log="">
>  <page>
>     <title>Search for a Knowledge Object</title>
>     <content>
>       <para>
>         <form method="post" enctype="multipart/form-data"
>          <textarea name="KONames" rows=6 cols=80></textarea>
>       <p><input type="submit" value="Generate Metadata" /></p>
>         </form>
>       </para>
>       <para>
>       <ul>
>         <xsp:logic>
>         </xsp:logic>
>       </ul>
>       </para>
>     </content>
>   </page>
> </xsp:page>
> Then in the XSP:logic tags, I would perform the necessary queries.
> know if this is the way to go about it.  Also, I know that I must
> the action attribute in <form> to something else, but what?  What I
> understand is how to make my code run after the submit button has been
> pressed.  I am assuming that this XSP page will generate xml and then
I can
> apply a stylesheet to format the data as I see fit.  Am I totally
> about this the wrong way?  Could anyone suggest a better approach.  It
> seems as though XSP resources on the web are limited, could someone
> point me to some good XSP sites?
> Thanks in advance,
> -gerardo

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message