cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: Passing Java objects
Date Tue, 29 Jun 2004 09:19:12 GMT
Scott Yeadon wrote:

> Hello,
>
> Could someone tell me if it's possible to pass Java objects around as 
> session information (for example an object containing information (or 
> other objects) such as userid, timing, database connection, etc). From 
> looking at the documentation everything looks like it must be 
> converted to XML form. Can anyone point me to the releavnt areas of 
> the documentation, as the session information only talks about XML or 
> pointing to a Java class that reads data from db/file. It's unlikely 
> Cocoon is any good to me if Java objects cannot be passed around 
> between pages in the same way that JSP/Servlets can pass this 
> information around in their request objects.


It seems you have looked at the "session framework", which is a 
convenience module allowing to manipulate session information as XML. 
Cocoon itself imposes absolutely no restriction on what can be stored as 
session attributes. You can get the request object using the 
ObjectModelHelper class (in Java) or "cocoon.request" (in flowscript) 
and from there on use the traditional servlet attribute methods.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


Mime
View raw message