cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naquin, Beth" <Beth.Naq...@morpho.com>
Subject RE: XSP help
Date Wed, 19 Jun 2002 18:06:19 GMT

You might try 

-- some of the sites listed in the cocoon documentation under cocoon-links,
such as
http://www.suranyami.com/intro.html  Make a decision whether you want to
embed your logic in your xsp page, use a logicsheet, etc

-- look at /cocoon/xsp/logicsheet example  It is a form with one text input
and a submit button.  I think this form posts to itself, then just displays
the user's input back to him.  But it might be an easy extension to perform
a query instead.

-- look at the esql logicsheet for performing database queries


-- look at some of the other cocoon samples and examples under
/cocoon/sample-apps.  There are some forms in there.



-----Original Message-----
From: Gerardo_Flores@mckinsey.com [mailto:Gerardo_Flores@mckinsey.com]
Sent: Wednesday, June 19, 2002 10:27 AM
To: cocoon-users@xml.apache.org
Subject: XSP help


Hello all, first post to this listserv :)  I'm having a little trouble
learning how to write XSPs.  I want to perform a very simple task, yet
really can't find many examples of XSPs anywhere on the web that will help
me accomplish my task.  What I would like to do is write an XSP that will
display a text area and a submit button and will then perform a database
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 file
upload example in Cocoon but getting nowhere.  I'm using Tomcat 3.2 and
Cocoon 2.0.  So far what I have is something like this that I hope makes
some sense:

<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<xsp:page
  language="java"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
  xmlns:xsp-request="http://apache.org/xsp/request/2.0"
  xmlns:xsp-response="http://apache.org/xsp/response/2.0"
  xmlns:log="http://apache.org/xsp/log/2.0">

 <page>
    <title>Search for a Knowledge Object</title>
    <content>
      <para>
        <form method="post" enctype="multipart/form-data" action="upload">
         <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.  Don't
know if this is the way to go about it.  Also, I know that I must change
the action attribute in <form> to something else, but what?  What I don't
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 going
about this the wrong way?  Could anyone suggest a better approach.  It
seems as though XSP resources on the web are limited, could someone also
point me to some good XSP sites?

Thanks in advance,

-gerardo

+---------------------------------------------------------+
This message may contain confidential and/or privileged
information.  If you are not the addressee or authorized to
receive this for the addressee, you must not use, copy,
disclose or take any action based on this message or any
information herein.  If you have received this message in
error, please advise the sender immediately by reply e-mail
and delete this message.  Thank you for your cooperation.
+---------------------------------------------------------+


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>

Mime
View raw message