I tried extending it and I still get the same result:
"INFO: Server startup in 21270 ms
http-8080-Processor25, 09-Nov-2004 12:41:42, root, OPTIONS, 200 "OK", 551 ms, /
http-8080-Processor24, 09-Nov-2004 12:41:43, root, PROPFIND, 404 "Not Found", 227 ms, /"
Oliver Zeigermann wrote:
This looks like you have configured your custom store correctly. I do not quite understand what your problem is, what do you mean with "it can't even find the root directory"?
To see if this would work why not start with
class MyStore extends WebdavFileStore { }
and successively overloading the methods to your need. After each change you can see if it still works and if not you can always undo your experiment.
Oliver
On Tue, 09 Nov 2004 10:49:40 -0800, Brian Lee <[EMAIL PROTECTED]> wrote:
I could be wrong but it sounds like you're missing some jars from your lib directory in WEB-INF....
I have a problem too with WCK
As a quick test I simply took WebdavFileStore's source and copied it into a com.test.mystores.TestStore class.
I then changed domain.xml from:
<nodestore classname="org.apache.slide.simple.store.WebdavStoreAdapter"> <!-- replace the above line with this one if your Slide version and your store supports macro operations on the store level --> <!--nodestore classname="org.apache.slide.simple.store.WebdavStoreMacroAdapter"--> <parameter name="callback-store">org.apache.slide.simple.reference.WebdavFileStore</parameter> <!-- this is where all the resources in the /files collection go to --> <!-- adapt to your needs --> <parameter name="rootpath">store</parameter> </nodestore>
to:
<nodestore classname="org.apache.slide.simple.store.WebdavStoreAdapter"> <!-- replace the above line with this one if your Slide version and your store supports macro operations on the store level --> <!--nodestore classname="org.apache.slide.simple.store.WebdavStoreMacroAdapter"--> <parameter name="callback-store">com.test.mystores.TestStore</parameter> <!-- this is where all the resources in the /files collection go to --> <!-- adapt to your needs --> <parameter name="rootpath">store</parameter> </nodestore>
Source: (exactly like WebdavFileStore except for changed class names)
"package com.test.mystores.;
import java.io.BufferedInputStream; ....
public class TestStore implements BasicWebdavStore, WebdavStoreLockExtension, WebdavStoreBulkPropertyExtension, WebdavStoreMacroCopyExtension, WebdavStoreMacroMoveExtension, WebdavStoreMacroDeleteExtension {
private static final String ROOTPATH_PARAMETER = "rootpath";
private static final String LOCK_FILE_EXTENSION = ".lck";
private static final String PROPERTY_FILE_PREFIX = ".";
private static void save(InputStream is, File file) throws IOException { OutputStream os = new BufferedOutputStream(new FileOutputStream(file)); try { FileHelper.copy(is, os); } finally { try { is.close(); } finally { os.close(); } } }
private static File root = null;
private static Service service = null;
private static LoggerFacade logger = null;
public synchronized void begin(Service service, Principal principal, Object connection, LoggerFacade logger, Hashtable parameters) throws ServiceAccessException, ServiceParameterErrorException, ServiceParameterMissingException { // set parameters only once... if (TestStore.root == null) { TestStore.service = service; TestStore.logger = logger; String rootPath = (String) parameters.get(ROOTPATH_PARAMETER); if (rootPath == null) throw new ServiceParameterMissingException(service, ROOTPATH_PARAMETER);
TestStore.root = new File(rootPath); if (!TestStore.root.exists()) { if (!TestStore.root.mkdirs()) { throw new ServiceParameterErrorException(service, ROOTPATH_PARAMETER + ": " + TestStore.root + " does not exist and could not be created"); } else { logger.logInfo("Created root folder at: " + rootPath); } } } } ....."
Anyways when WebdavFileStore is used - everything works fine. However when my custom class is used - it can't even find the root directory.... Is there something I'm doing wrong?
Roman D wrote:
Hi,
I am trying to run example WCK servlet for 3 days with no luck. As far as I can understand from http://wiki.apache.org/jakarta-slide/WebDavConstructionKit WCK has *org.apache.slide.simple.reference.WebdavFileStore* which is not a servlet. It supposed to be used through Slide. Domain.xml configures Slide to use whatever storage you like, or something like that. Now, as I understand, I need to run Slide servlet *org.apache.slide.webdav.WebdavServlet* and use Domain.xml with *<parameter name="callback-store">org.apache.slide.store.simple.WebdavFileStore</parameter>
*So I put *Domain.xml* in *WEB-INF/classes*. Then add *slide-webdavservlet-2.2pre1.ja*r into *WEB-INF/lib* Then add following to web.xml; *<servlet-mapping> <servlet-name>org.apache.slide.webdav.WebdavServlet</servlet-name>* Tomcat 5.0 says: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name org.apache.slide.webdav.WebdavServlet
What do I do wrong? Do I understand slide/wck relationship correctly?
Thanks!
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
