cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Engelhart <mengelh...@earthtrip.com>
Subject Re: Getting URL parameter values
Date Fri, 09 Jun 2000 20:16:45 GMT
on 6/9/00 1:41 PM, Udaypal R. Aarkoti at uaarkoti@techcontrol.com wrote:

> Hi Mike,
> i'm trying to design a Request/Response system where my request
> will be look something like this
> 
> <Application>
> <Request id="923" timestamp="12:43:32">
> <createAccount node="fll" project="rubi">
> <username>Udaypal</username>
> .
> .
> .
> </createAccount>
> </Request>
> <Request>
> .
> .
> .
> </Request>
> </Application>
> 
> 
> And the response looks the same expect you have Responses in place of
> Requests.
> 
> My question is, how can i create these elements (Application, Request,
> createAccount etc...) on FLY. I have a DTD
> which gives me all the various elements, but i dont have a DTDParser. Do you
> know a place where i can get a DTDParser.
> 
> I was thinking of using Cocoon in this for authentication (is there a better
> option, where i can use cocoon for doing
> more than the authentication using the LDAP stuff). Can you give me an
> example where i can create sessions to do my
> authentication.
> 
> Thank you in advance
> Udaypal R. Aarkoti

XSP allows for all of this
http://xml.apache.org/cocoon/xsp.html

the above page describes everything you need to do what you're asking.
Session management using HttpSessions is out of the scope of this mailing
list but as you'll see when you read the documentation, there is a "session"
variable in every XSP page that is a wrapper around the HttpSession object
for that request.

As for a DTDParser, I've never heard of such a thing???
What is it?


Here's some sample code to create attributes on the fly:

<xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core">
    <xsp:logic>
       String id = request.getParameter("id");
       String timeStamp = (String) session.getAttribute("timestamp");
    </xsp:logic>   
<Application>
    <Request>
        <xsp:attribute name="id"><xsp:expr>id</xsp:expr></xsp:attribute>
        <xsp:attribute
name="timestamp"><xsp:expr>timeStamp</xsp:expr></xsp:attribute>
</Application>

You really need to thoroughly read the documentation on this to understand
how it works.  The above referenced documentation URL for XSP is very good.

Mike



Mime
View raw message