You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by William Bagby <wi...@adone.com> on 2001/02/21 16:36:19 UTC

Storing Session info in Producer

I have modified to ProducerFromFile so that it strips the first "directory"
from the requestURI, sets a session attribute, and loads the file *without*
the "directory" I stripped out.  For example:

RequestURI = /username/foo/bar/index.xml
Put "username" in session
Load /foo/bar/index.xml (relative to docroot of course)

I am able to load the XML file correctly, but since it contains XSP, the
generated .class is put into the repository as
/username/foo/bar/_index.class (again, relative to the repository root), so
that the page cannot be loaded.

I am not married to the idea of setting the Session attribute in the
Producer, so if someone has another suggestion I'm all ears.  It just seems
to be a good place to do it.  Of course I could write another Servlet
specifically for this purpose, but then I'm getting into Servlet chaining,
blah, blah.

Any suggestions?

William.

p.s. btw, this is my THIRD post to the list, I never received responses for
the first two...I'm starting to feel like there's no love.