cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Conover <>
Subject suggestions on how to implement a controller using cocoon/xsp
Date Fri, 25 Aug 2000 18:01:20 GMT
I'm building a system where I can upload a file, describe it, assign,
security, etc.  So the page flow goes like this:

upload file (servlet) --> describe file (xml/xsp) --> select category for
file (xml/xsp) --> assign security rights for file (xml/xsp)

For everything after the servlet, I think I need a controller.  I was
thinking that it could be in the form of a common xsp file for the 3 xml
source files, but I'm not sure this will work.

Here's how it might work.  The user enters in some description info on the
"upload file" page, then clicks submit.  The page actually submits to
itself, and in the first lines of the xsp page, I use the fp taglib to
determine if a post operation has taken place.  If so, then I use a hidden
"target" post variable to determine where the post came from (this would be
a big xsl:choose, with an xsl:when for each of the three pages).  Under the
"describefile" xsl:when clause, I execute some insert or update sql
statements to write the description to the database, and finally I forward
(using a utility in Marcelo's DB prism lib) to the next xml page in the
chain ("select category").

However I don't think I can get access to the request object before the xsp
page actually writes out some stuff to the browser (that would screw up my
forwarding to the next page in the chain).

Does this sound workable?  Does anyone have suggestion on how to implement a
controller in a cocoon/xsp environment?


View raw message