cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pier Fumagalli <p...@betaversion.org>
Subject Flow and auditing...
Date Mon, 31 Mar 2003 14:04:04 GMT
I am in the process of converting one of our applications to use the Cocoon
flow (it's a registration site, business logic is quite complicated), and
one of the requirements I have is to have it "audited" by an external
company.

Right now, to audit the application, we have in each page a small 1x1 image,
and the auditing company prepares statistics based on the referer URL of the
image they provide. This image is never cached on the client side, nor by
any proxy, so basically, they tell me at the end what was the "path"
followed by users, who dropped out and where, and so on...

Now, the way in which we currently implement this is using a servlet which
is the action of each form (all data is posted to the servlet), and all the
servlet does is at the end of the process, to send a redirect to a page
(external redirect, HTTP 302) to a "view" JSP.

So what happens is something like:

C: GET /register/index.jsp
C: Form displayed
C: POST /register/action
S: HTTP 302 (redirect to /register/details.jsp)
C: GET /register/details.jsp
C: Form displayed
C: POST /register/action
S: HTTP 302 (redirect to /register/products.jsp)
[...] and so on

We need to "redirect" the request, instead of displaying the next form upon
posting the form data, because when the page is displayed in the client
browser, its URL will become meaningful for the external tracking company,
which gathers it from the "referer" header of the image HTTP request.

Now, as far as I can see there is no way to do something like this from the
cocoon flow, I have no way to send a redirect, and moreover, I don't have a
way to store the "beanDict" associated with "sendPageAndWait" (for example)
with a continuation...

What I was thinking about is to do something like:

sendRedirect("http://host/myurl", beanDict);

And to have a generator or a transformer that, without creating a new
continuation, could retrieve the bean data I associated with the
continuation calling "sendRedirect", and allowing me to play around with the
bean values I passed to sendRedirect.

Does this make any sense to any of you? Do you think it would be useful to
some extent?

    Pier




Mime
View raw message