Hi,

I'm trying to follow Grzegorz's suggestion and have configured my method servlet as follows:

  <bean name="com.jac.exist.cocoon-exist.serviceTarget"
    class="com.jac.exist.servlets.ServletServiceEXistServlet">
<servlet:context mount-path="/exist" context-path="blockcontext:/ cocoon-exist/">
      <servlet:init-params>
        <entry key="configuration" value="${exist.configuration}"/>
        <entry key="basedir" value="${exist.basedir}"/>
        <entry key="start" value="true"/>
      </servlet:init-params>
    </servlet:context>
  </bean>

  <bean name="service.pointcut.advisor"
class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
    <property name="advice" ref="servletServiceInterceptor"/>
    <property name="mappedName" value="service"/>
  </bean>

<bean name="servletServiceInterceptor" class="com.jac.exist.cocoon.ServletServiceInterceptor"/>

  <bean name="com.jac.exist.cocoon-exist.service"
    class="org.springframework.aop.framework.ProxyFactoryBean">
    <property name="interceptorNames">
      <list>
        <value>service.pointcut.advisor</value>
        <value>com.jac.exist.cocoon-exist.serviceTarget</value>
      </list>
    </property>
  </bean>


This results in the following error:

Invalid property 'contextPath' of bean class [org.springframework.aop.framework.ProxyFactoryBean]: No property 'contextPath' found

I can't see where I've misconfigured - The same sort of config works for advice I have set on other beans.

On the wider issue, I agree that it would be nice to be able to configure this somewhere - although that could be as simple as providing a suitable Spring Interceptor along with instructions on how to configure it.

Robin








On 25 Mar 2008, at 13:48, Reinhard Poetz wrote:

Vadim Gritsenko wrote:
On Mar 25, 2008, at 9:21 AM, Grzegorz Kossakowski wrote:
Robin Wyles pisze:
Hi,

I have a servlet (eXist db) configured as a block using
blockServlet.xml, this works well - my other blocks are able to perform DB operations using eXist's REST API through servlet services. But, is there a way I can make my eXist block 'private', i.e. only available via
servlet services and not mounted to any publicly available path?

What about creating Spring AOP's advice on service() method? You could check there type of Request object and if it's non-SSF instance then you could return HTTP 405 (Method Not Allowed) status code
as response.
IMHO Robin's scenario is not unique and ability to declare 'internal' servlets should be a standard feature of SSF.

I agree with Vadim.

--
Reinhard Pötz Managing Director, {Indoqa} GmbH http://www.indoqa.com/en/people/ reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair [EMAIL PROTECTED] ______________________________________________________________________ ___

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


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to