You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Juerg Meier <jc...@proxymit.net> on 2008/11/23 14:35:11 UTC

POST request interception

Hi,

I'd like to know what's the recommended way to intercept incoming POST
requests in sling *before* they get written to the JCR. 

JCR itself supports observation, but that triggers only after the data
has been written to the repo, so that's not quite what I'm looking for.

Thanks for your hints.

-- Juerg


Re: POST request interception

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Juerg,

Juerg Meier schrieb:
> Hi,
> 
> I'd like to know what's the recommended way to intercept incoming POST
> requests in sling *before* they get written to the JCR. 
> 
> JCR itself supports observation, but that triggers only after the data
> has been written to the repo, so that's not quite what I'm looking for.

Carsten Ziegeler once implemtented a post processing feature using a
SlingPostProcessor interface [1].

These services are called after a SlingPostOperation has completed but
before the changes in the repository are saved by Session.save(). See
AbstractSlingOperation.run [2].

Hope this helps.

Regards
Felix

[1]
http://svn.apache.org/repos/asf/incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/SlingPostProcessor.java
[2]
http://svn.apache.org/repos/asf/incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/AbstractSlingPostOperation.java

Re: POST request interception

Posted by 付 尧 <gu...@gmail.com>.
Hi, Juerg

You can add a filter to intercept the request.
-----
Jack



在 2008-11-23,下午9:35, Juerg Meier 写道:

> Hi,
>
> I'd like to know what's the recommended way to intercept incoming POST
> requests in sling *before* they get written to the JCR.
>
> JCR itself supports observation, but that triggers only after the data
> has been written to the repo, so that's not quite what I'm looking  
> for.
>
> Thanks for your hints.
>
> -- Juerg
>