Hi all,

I am writing this because the archive isn't accessible at the moment, so 
I can' t reply to my original mail.

A while ago, I had the problem that I wanted to send XML data via POST 
to a XSP. I received some interesting hints from Vadim Gritschenko 
(thanks again, Vadim), but in the end, nothing seemed to solve my 
problem, at least in a simple, obvious way. So, here is what I found out:

Actually, the solution is very simple. I looked for a way to directly 
access the input stream which is associated with a HttpServletRequest. 
This can be done via

public Map act (Redirector redirector,
            SourceResolver resolver,
            Map objectModel,
            String source,
            Parameters params)

which is a method of org.apache.cocoon.acting.AbstractAction. Using this 
approach, the HttpServletRequest instance is accessible via
 
objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT);

I developed my own action, passed the request object the 
HttpServletRequest via setAttribute(...), and, in the sitemap, wrapped 
the XSP generator in my new action. This way, I could access the 
HttpServetRequest  and its input stream in the XSP.

Maybe, this is not the cleanest approach of all, but it exactly does 
what I want.

Regards

Boscoe



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

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

Reply via email to