jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amsmota <amsm...@gmail.com>
Subject SimpleWevdavServlet with Spring DispatcherServlet/ServletWrappingController
Date Tue, 29 Apr 2008 09:50:49 GMT

Hello:

I'm trying unsuccessfully for 3 days now to put up a test case for
Jackrabbit and my boss just told me to kill the project if I can't solve
this today. Which of course I don't want to do (kill the project, not solve
the thing :)

What I'm trying to do is using SimpleWevdavServlet wrapped in a
DispatcherServlet/ServletWrappingController, "injecting" a bean configured
repository in my SimpleWevdavServlet using the Spring WebApplicationContext.
But whatever I do I allways get

<D:error>
   <dcr:exception>
      <dcr:class>javax.jcr.NoSuchWorkspaceException</dcr:class>
      <dcr:message>jackrabbit</dcr:message>
   </dcr:exception>
</D:error>

Basically what I have is:

	<bean id="strutsWrappingController"
		class="org.springframework.web.servlet.mvc.ServletWrappingController">
		<property name="servletClass">
			<value>com.meridianp2p.stf.kb.jcr.webdav.JcrConnector</value>
		</property>
		<property name="initParameters">
			<props>
				<prop key="resource-path-prefix">/repotest</prop>
				<prop key="resource-config">/WEB-INF/config.xml</prop>
				<prop key="missing-auth-mapping">anonymous:anonymous</prop>
				<prop key="authenticate-header">Basic realm="Jackrabbit Webdav
Server"</prop>
			</props>			
		</property>		
	</bean>

and

	<bean id="repository"
		class="org.springmodules.jcr.jackrabbit.RepositoryFactoryBean">
		<property name="configuration" value="WEB-INF/jackrabbit.xml"/>
		<property name="homeDir" value="repo2"/>
	</bean>

and in my extended SimpleWevdavServlet

	public void init(ServletConfig config) throws ServletException {
		super.init(config);
		final WebApplicationContext context = WebApplicationContextUtils
				.getWebApplicationContext(config.getServletContext());
		Repository repository = (Repository) context.getBean("repository");
		setRepository(repository);
	}

Can someone please help?

Thanks.
-- 
View this message in context: http://www.nabble.com/SimpleWevdavServlet-with-Spring-DispatcherServlet-ServletWrappingController-tp16957017p16957017.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message