You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tilo Lier <tL...@wachter-is.com> on 2000/03/02 20:47:27 UTC

Cocoon on MAC

I can't get Cocoon work on my Macintosh (MAC OS 9, WebSTAR 4.2, ServletExec
2.2) ...

Everything is working fine (WebSTAR and ServletExec) but i don't now how to
install COCOON...

The first Problem for me is how to connect all .XML Files to the
COCOON.JAR...

CAN ANYONE HELP ME...

Thanks...

Tilo Lier


RE: User input in xsps

Posted by "K. Rumman Akhter" <ka...@sputnik7.com>.
PERFECT!!!
thanks,
RUmman

-----Original Message-----
From: Mike Engelhart [mailto:mengelhart@earthtrip.com]
Sent: Thursday, March 02, 2000 4:45 PM
To: cocoon-users@xml.apache.org
Subject: Re: User input in xsps


K. Rumman Akhter wrote:

> i guess my question would be, what is the equavalent syntax of
> request.getParameter("foo"); and request.putValue(); as in XSPs.
> RUmman
The xsp processor includes wrappers for all those objects and predefines the
variables for many of them.  i'm not sure what you mean by syntax??  The XSP
documentation explains all of this in detail...
http://xml.apache.org/cocoon/xsp.html

Here's a simple example though:

<?xml version="1.0"?>

<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="yoursheet.xsl" type="text/xsl"?>

<xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core">
    <DOCUMENT>
        <xsp:logic>
            session = request.getSession(true);
            String myFormVariable = request.getParameter("MYFORMVARIABLE");
            session.putValue("VAR1", myFormVariable);
        </xsp:logic>
    </DOCUMENT>
</xsp:page>

If you're using tomcat or some other JSDK 2.2 compliant servlet engine, use
session.setAttribute("VAR1", myFormVariable)

session.putValue() is deprecated in 2.2

Mike


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


Re: User input in xsps

Posted by Mike Engelhart <me...@earthtrip.com>.
K. Rumman Akhter wrote:

> i guess my question would be, what is the equavalent syntax of
> request.getParameter("foo"); and request.putValue(); as in XSPs.
> RUmman
The xsp processor includes wrappers for all those objects and predefines the
variables for many of them.  i'm not sure what you mean by syntax??  The XSP
documentation explains all of this in detail...
http://xml.apache.org/cocoon/xsp.html

Here's a simple example though:

<?xml version="1.0"?>

<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="yoursheet.xsl" type="text/xsl"?>

<xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core">
    <DOCUMENT>
        <xsp:logic>
            session = request.getSession(true);
            String myFormVariable = request.getParameter("MYFORMVARIABLE");
            session.putValue("VAR1", myFormVariable);
        </xsp:logic>
    </DOCUMENT>
</xsp:page>

If you're using tomcat or some other JSDK 2.2 compliant servlet engine, use
session.setAttribute("VAR1", myFormVariable)

session.putValue() is deprecated in 2.2

Mike


RE: User input in xsps

Posted by "K. Rumman Akhter" <ka...@sputnik7.com>.
i guess my question would be, what is the equavalent syntax of
request.getParameter("foo"); and request.putValue(); as in XSPs.
RUmman

-----Original Message-----
From: Mike Engelhart [mailto:mengelhart@earthtrip.com]
Sent: Thursday, March 02, 2000 3:48 PM
To: cocoon-users@xml.apache.org
Subject: Re: User input in xsps


K. Rumman Akhter wrote:

> Hi,
> I am trying to make an XSP user inferface for my browser-based
application.
> what i want to do is enter some data from a form to a  session so that all
> states of user-interface has access to the same data. i am completely
stuck
> on how to do that. specifically what i want to know is how to enter form
> data into a session object. please, and pointers or suggestions will be
> highly appreciated.
>
> Rumman
Take a look at the Servlet API documentation.
http://java.sun.com/products/servlet/2.2/javadoc/index.html

You really need an understanding of servlets to use an XSP to do this.

Once you have servlets understood, all the concepts are the same (except
that you'll be using XML and XSL rather than outputting HTML directly).

Mike


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


Re: User input in xsps

Posted by Mike Engelhart <me...@earthtrip.com>.
K. Rumman Akhter wrote:

> Hi,
> I am trying to make an XSP user inferface for my browser-based application.
> what i want to do is enter some data from a form to a  session so that all
> states of user-interface has access to the same data. i am completely stuck
> on how to do that. specifically what i want to know is how to enter form
> data into a session object. please, and pointers or suggestions will be
> highly appreciated.
> 
> Rumman
Take a look at the Servlet API documentation.
http://java.sun.com/products/servlet/2.2/javadoc/index.html

You really need an understanding of servlets to use an XSP to do this.

Once you have servlets understood, all the concepts are the same (except
that you'll be using XML and XSL rather than outputting HTML directly).

Mike


RE: User input in xsps

Posted by "K. Rumman Akhter" <ka...@sputnik7.com>.
Hi,
I am trying to make an XSP user inferface for my browser-based application.
what i want to do is enter some data from a form to a  session so that all
states of user-interface has access to the same data. i am completely stuck
on how to do that. specifically what i want to know is how to enter form
data into a session object. please, and pointers or suggestions will be
highly appreciated.

Rumman


Re: Cocoon on MAC

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
On 2/3/00 at 8:47 pm, tLier@wachter-is.com (Tilo Lier) wrote:

>I can't get Cocoon work on my Macintosh (MAC OS 9, WebSTAR 4.2, ServletExec
>2.2) ...
>
>Everything is working fine (WebSTAR and ServletExec) but i don't now how to
>install COCOON...

Off the top of my head, I think this is what I did :)

Put all of the .jar files that come with Cocoon into your Classes folder:

    HD:System Folder:Extensions:MRJ Libraries:MRJClasses:

This adds them to the System Classpath

Put an Alias of Cocoon's "Samples" folder into WebStar's folder so they can be
served.

>The first Problem for me is how to connect all .XML Files to the
>COCOON.JAR...

Create (or modify) a ".xml" suffix mapping in the WebStar Admin application,
mapping it to the "SERVLET" Action.

Then I think you have to set up something in ServletExec's Admin, but I don't
remember what, and I don't have access to the software right now (Sorry).

I suspect it is to do with mapping ".xml" to Cocoon's classpath
"org.apache.cocoon.Cocoon", and passing the path to Cocoon's properties file as
a parameter for initialising Cocoon. This is covered in the general
documentation.


hope this helps

regards Jeremy

      ____________________________________________________________________

      Jeremy Quinn                                             media.demon
                                                           webSpace Design
     <ma...@media.demon.co.uk>       <http://www.media.demon.co.uk>
      <phone:+44.[0].207.737.6831>          <pa...@sms.genie.co.uk>




Re: Cocoon on MAC

Posted by Mike Engelhart <me...@earthtrip.com>.
Tilo Lier wrote:

> I can't get Cocoon work on my Macintosh (MAC OS 9, WebSTAR 4.2, ServletExec
> 2.2) ...
> 
> Everything is working fine (WebSTAR and ServletExec) but i don't now how to
> install COCOON...
> 
> The first Problem for me is how to connect all .XML Files to the
> COCOON.JAR...
> 
> CAN ANYONE HELP ME...
> 
> Thanks...
I haven't used WebSTAR in a long time but I have used Cocoon using the
Apache group's Tomcat servlet engine on OS9 and it works fine.  Look in the
WebSTAR documentation on how to configure filename extensions to be
processed by a cgi or plug-in ( in this case you want *.xml files to be
processed by the ServletExec plug-in).
Then in ServletExec, you need to add Cocoon.jar to your classpath so that it
will work.  

That should do it.

Mike