cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "K. Rumman Akhter" <kakh...@sputnik7.com>
Subject RE: User input in xsps
Date Thu, 02 Mar 2000 21:57:30 GMT
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


Mime
View raw message