Re: Session attribute - database

2002-04-02 Thread Christian Haul

On 28.Mar.2002 -- 10:22 AM, Alexander Kruth wrote:
 Hi!
 Is it possible to write a session-attribute to a database?

IMHO no, not using the database actions from main trunk. Database
actions in scratchpad support arbitrary sources.

Chris.

-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Session attribute - database

2002-03-28 Thread Alexander Kruth

Hi!
Is it possible to write a session-attribute to a database?

=descriptor.xml===
?xml version=1.0 encoding=UTF-8?
root
  connectionsafeuser/connection
  table name=users
key
  key param=id dbcol=userid type=int/
/key
values
  value param=session:get-attribute name=username/
dbcol=username type=string/
 !-- can't work this way --
  value param=file dbcol=filename type=string/
  value param=file dbcol=file type=binary/
/values
  /table
/root
=/descriptor.xml===

=sitemap.xmap
[...]
  map:match pattern=upload
map:act type=session-validator
  map:parameter name=descriptor
value=context://alex/descriptors/params.xml/
  map:parameter name=validate value=username,filename/
  map:generate src=docs/upload.xml/
  map:transform src=stylesheets/simple-page2html.xsl/
  map:serialize/
/map:act
map:redirect-to uri=login/
  /map:match

  map:match pattern=do-upload
map:act type=upd-record
  map:parameter name=descriptor
value=context://alex/image-record.xml/
/map:act
map:redirect-to uri=protected/
  /map:match
[...]
==/sitemap.xmap


Thank you,
Alex.


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

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]